Documentation ¶
Overview ¶
Package cachefs implements a wrapper that caches filesystem actions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache maintains in-memory cache of recently-read data to speed up filesystem operations.
func (*Cache) IterateEntries ¶ added in v0.11.0
func (c *Cache) IterateEntries(ctx context.Context, d fs.Directory, w EntryWrapper, callback func(context.Context, fs.Entry) error) error
IterateEntries reads the contents of a provided directory using ObjectID of a directory (if any) to cache the results. The given callback is invoked on each item in the directory.
type DirectoryCacher ¶
type DirectoryCacher interface {
IterateEntries(ctx context.Context, d fs.Directory, w EntryWrapper, callback func(context.Context, fs.Entry) error) error
}
DirectoryCacher reads and potentially caches directory entries for a given directory.
type EntryWrapper ¶ added in v0.9.0
EntryWrapper allows an fs.Entry to be modified before inserting into the cache.
Click to show internal directories.
Click to hide internal directories.