go-fuse: github.com/hanwen/go-fuse/unionfs Index | Files

package unionfs

import "github.com/hanwen/go-fuse/unionfs"

Index

Package Files

autounion.go cachingfs.go create.go dircache.go timedcache.go unionfs.go unionfs_xattr_test_linux.go

func Getxattr Uses

func Getxattr(path string, attr string, dest []byte) (sz int, err error)

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 Uses

func NewAutoUnionFs(directory string, options AutoUnionFsOptions) pathfs.FileSystem

func NewCachingFileSystem Uses

func NewCachingFileSystem(fs pathfs.FileSystem, ttl time.Duration) pathfs.FileSystem

func NewUnionFs Uses

func NewUnionFs(fileSystems []pathfs.FileSystem, options UnionFsOptions) (pathfs.FileSystem, error)

func NewUnionFsFromRoots Uses

func NewUnionFsFromRoots(roots []string, opts *UnionFsOptions, roCaching bool) (pathfs.FileSystem, error)

type AutoUnionFsOptions Uses

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 Uses

type TimedCache struct {
    PurgeTimer *time.Timer
    // contains filtered or unexported fields
}

func NewTimedCache Uses

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 Uses

func (c *TimedCache) DropAll(names []string)

func (*TimedCache) DropEntry Uses

func (c *TimedCache) DropEntry(name string)

func (*TimedCache) Get Uses

func (c *TimedCache) Get(name string) interface{}

func (*TimedCache) GetFresh Uses

func (c *TimedCache) GetFresh(name string) interface{}

func (*TimedCache) Purge Uses

func (c *TimedCache) Purge()

Drop all expired entries.

func (*TimedCache) Set Uses

func (c *TimedCache) Set(name string, val interface{})

type TimedCacheFetcher Uses

type TimedCacheFetcher func(name string) (value interface{}, cacheable bool)

TimedCache 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.

type UnionFsOptions Uses

type UnionFsOptions struct {
    BranchCacheTTL   time.Duration
    DeletionCacheTTL time.Duration
    DeletionDirName  string
    HiddenFiles      []string
}

Package unionfs imports 14 packages (graph) and is imported by 32 packages. Updated 2019-08-05. Refresh now. Tools for package owners.