Documentation ¶
Overview ¶
Package filemetadata contains types of metadata for files, to be used for caching.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // XattrDigestName is the xattr name for the object digest. XattrDigestName string // XattrAccess is the object to control access of XattrDigestName. XattrAccess xattributeAccessorInterface = xattributeAccessor{} )
Functions ¶
func ResetGlobalCache ¶
func ResetGlobalCache()
ResetGlobalCache clears the cache globally. Applies to all Cache instances created by NewSingleFlightCache.
Types ¶
type Cache ¶
type Cache interface { Get(path string) *Metadata Delete(filename string) error Update(path string, cacheEntry *Metadata) error GetCacheHits() uint64 GetCacheMisses() uint64 }
Cache is a cache for file contents->Metadata.
func NewNoopCache ¶
func NewNoopCache() Cache
NewNoopCache returns a cache that doesn't cache (evaluates on every Get).
func NewSingleFlightCache ¶
func NewSingleFlightCache() Cache
NewSingleFlightCache returns a singleton-backed in-memory cache, with no validation.
type Metadata ¶
type Metadata struct { Digest digest.Digest IsExecutable bool IsDirectory bool MTime time.Time Err error Symlink *SymlinkMetadata }
Metadata contains details for a particular file.
type SymlinkMetadata ¶
SymlinkMetadata contains details if the given path is a symlink.
Click to show internal directories.
Click to hide internal directories.