unionfs

package
v0.0.0-...-c29cdc9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2014 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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)

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

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

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) Purge

func (c *TimedCache) Purge()

Drop all expired entries.

func (*TimedCache) Set

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

type TimedCacheFetcher

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

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.

type UnionFsOptions

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL