Documentation ¶
Index ¶
- func NewCachingFileSystem(fs pathfs.FileSystem, ttl time.Duration) pathfs.FileSystem
- func NewUnionFs(fileSystems []pathfs.FileSystem, options UnionFsOptions) pathfs.FileSystem
- func NewUnionFsFromRoots(roots []string, opts *UnionFsOptions, roCaching bool) (pathfs.FileSystem, error)
- type AutoUnionFsOptions
- type RootFileSystem
- type TimedCache
- type TimedCacheFetcher
- type UnionFsOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCachingFileSystem ¶
func NewCachingFileSystem(fs pathfs.FileSystem, ttl time.Duration) pathfs.FileSystem
func NewUnionFs ¶
func NewUnionFs(fileSystems []pathfs.FileSystem, options UnionFsOptions) pathfs.FileSystem
func NewUnionFsFromRoots ¶
func NewUnionFsFromRoots(roots []string, opts *UnionFsOptions, roCaching bool) (pathfs.FileSystem, error)
Types ¶
type AutoUnionFsOptions ¶
type AutoUnionFsOptions struct { UnionFsOptions nodefs.Options pathfs.PathNodeFsOptions // If set, run updateKnownFses() after mounting. UpdateOnMount bool // If set hides the _READONLY file. HideReadonly bool }
type RootFileSystem ¶
type RootFileSystem interface { SetMountState(state *fuse.Server) SetFileSystemConnector(conn *nodefs.FileSystemConnector) pathfs.FileSystem }
A pathfs.FileSystem that we can hookup with MountState and FileSystemConnector
func NewAutoUnionFs ¶
func NewAutoUnionFs(directory string, options AutoUnionFsOptions) RootFileSystem
type TimedCache ¶
func NewTimedCache ¶
func NewTimedCache(fetcher TimedCacheFetcher, ttl time.Duration) *TimedCache
Creates a new cache with the given TTL. If TTL <= 0, the caching is indefinite.
func (*TimedCache) DropAll ¶
func (c *TimedCache) DropAll(names []string)
func (*TimedCache) DropEntry ¶
func (c *TimedCache) DropEntry(name string)
func (*TimedCache) Get ¶
func (c *TimedCache) Get(name string) interface{}
func (*TimedCache) GetFresh ¶
func (c *TimedCache) GetFresh(name string) interface{}
func (*TimedCache) Set ¶
func (c *TimedCache) Set(name string, val interface{})
type TimedCacheFetcher ¶
TimedIntCache caches the result of fetch() for some time. It is thread-safe. Calls of fetch() do no happen inside a critical section, so when multiple concurrent Get()s happen for the same key, multiple fetch() calls may be issued for the same key.
Click to show internal directories.
Click to hide internal directories.