Documentation
¶
Index ¶
Constants ¶
View Source
const (
XXH3 digest.Algorithm = "xxh3"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CacheRefMetadata ¶
type CacheRefMetadata struct {
cache.RefMetadata
}
type CachedResult ¶
type CachedResult[K comparable, V any] struct { // contains filtered or unexported fields }
func (*CachedResult[K, V]) Release ¶
func (res *CachedResult[K, V]) Release()
func (*CachedResult[K, V]) Result ¶
func (res *CachedResult[K, V]) Result() V
type ChangeFunc ¶
type ChangeFunc func(kind ChangeKind, path string, lowerStat, upperStat *types.Stat) error
type ChangeKind ¶
type ChangeKind = fsutil.ChangeKind
const ( ChangeKindAdd ChangeKind = fsutil.ChangeKindAdd ChangeKindModify ChangeKind = fsutil.ChangeKindModify ChangeKindDelete ChangeKind = fsutil.ChangeKindDelete ChangeKindNone ChangeKind = fsutil.ChangeKindDelete + 1 )
type ChangeWithStat ¶
type ChangeWithStat struct {
// contains filtered or unexported fields
}
type ErrConflict ¶
func (*ErrConflict) Error ¶
func (e *ErrConflict) Error() string
type HashedStatInfo ¶
type HashedStatInfo struct { StatInfo // contains filtered or unexported fields }
func (*HashedStatInfo) Digest ¶
func (s *HashedStatInfo) Digest() digest.Digest
type SingleflightGroup ¶
type SingleflightGroup[K comparable, V any] struct { // contains filtered or unexported fields }
SingleflightGroup is similar to sync.Singleflight but: 1. Handles context cancellation (ctx provided to callback is only cancelled once no one is waiting on the result) 2. Caches results until all returned CachedResults are released
func (*SingleflightGroup[K, V]) Do ¶
func (g *SingleflightGroup[K, V]) Do(ctx context.Context, key K, fn func(context.Context) (V, error)) (*CachedResult[K, V], error)
Click to show internal directories.
Click to hide internal directories.