Documentation ¶
Index ¶
- func Getxattr(path string, attr string, dest []byte) (sz int, err error)
- func NewAutoUnionFs(directory string, options AutoUnionFsOptions) pathfs.FileSystem
- func NewCachingFileSystem(fs pathfs.FileSystem, ttl time.Duration) pathfs.FileSystem
- func NewUnionFs(fileSystems []pathfs.FileSystem, options UnionFsOptions) (pathfs.FileSystem, error)
- func NewUnionFsFromRoots(roots []string, opts *UnionFsOptions, roCaching bool) (pathfs.FileSystem, error)
- func TestUnionFsFdLeak(t *testing.T)
- type AutoUnionFsOptions
- type TimedCache
- type TimedCacheFetcher
- type UnionFsOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Getxattr ¶
Darwin doesn't have support for syscall.Getxattr() so we pull it into its own file and implement it by hand on Darwin.
func NewAutoUnionFs ¶
func NewAutoUnionFs(directory string, options AutoUnionFsOptions) pathfs.FileSystem
func NewCachingFileSystem ¶
func NewCachingFileSystem(fs pathfs.FileSystem, ttl time.Duration) pathfs.FileSystem
func NewUnionFs ¶
func NewUnionFs(fileSystems []pathfs.FileSystem, options UnionFsOptions) (pathfs.FileSystem, error)
func NewUnionFsFromRoots ¶
func NewUnionFsFromRoots(roots []string, opts *UnionFsOptions, roCaching bool) (pathfs.FileSystem, error)
func TestUnionFsFdLeak ¶
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 // Expose this version in /status/gounionfs_version Version string }
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.