store

package
v0.0.0-...-c928be0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2014 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUFFIX_CACHE_NODE    = "-node"
	SUFFIX_CACHE_LISTING = "-list"
)
View Source
const FUSE_VERBOSE_LEVEL = 7

Variables

This section is empty.

Functions

func NewFuseKVFileSystem

func NewFuseKVFileSystem() (pathfs.FileSystem, error)

func NewKVFile

func NewKVFile(path string, store config.KVStore) nodefs.File

func Verbose

func Verbose(message string, args ...interface{})

Types

type FuseKVFileSystem

type FuseKVFileSystem struct {
	/* the path file system interface we have to implement */
	pathfs.FileSystem
	/* the cache used by the fs */
	Cache cache.Cache
	/* the kv agent we are using */
	StoreKV config.KVStore
	/* the time we were created / initialized */
	BigBang time.Time
	/* a map of file name to last change event */
	NodeChanges map[string]time.Time
}

func (*FuseKVFileSystem) CachedListing

func (px *FuseKVFileSystem) CachedListing(key string) ([]*config.Node, error)

func (*FuseKVFileSystem) CachedNode

func (px *FuseKVFileSystem) CachedNode(key string) (*config.Node, error)

func (*FuseKVFileSystem) CleanDir

func (px *FuseKVFileSystem) CleanDir(key string)

func (*FuseKVFileSystem) CleanNode

func (px *FuseKVFileSystem) CleanNode(key string)

func (*FuseKVFileSystem) Create

func (px *FuseKVFileSystem) Create(name string, flags uint32, mode uint32, context *fuse.Context) (file nodefs.File, code fuse.Status)

func (*FuseKVFileSystem) GetAttr

func (px *FuseKVFileSystem) GetAttr(name string, context *fuse.Context) (*fuse.Attr, fuse.Status)

func (*FuseKVFileSystem) Mkdir

func (px *FuseKVFileSystem) Mkdir(name string, mode uint32, context *fuse.Context) fuse.Status

func (*FuseKVFileSystem) NodeWatcher

func (px *FuseKVFileSystem) NodeWatcher() error

func (*FuseKVFileSystem) Open

func (px *FuseKVFileSystem) Open(name string, flags uint32, context *fuse.Context) (file nodefs.File, code fuse.Status)

func (*FuseKVFileSystem) OpenDir

func (px *FuseKVFileSystem) OpenDir(name string, context *fuse.Context) (stream []fuse.DirEntry, status fuse.Status)

func (*FuseKVFileSystem) Rmdir

func (px *FuseKVFileSystem) Rmdir(name string, context *fuse.Context) (code fuse.Status)

func (*FuseKVFileSystem) String

func (px *FuseKVFileSystem) String() string
func (px *FuseKVFileSystem) Unlink(name string, context *fuse.Context) (code fuse.Status)

type KVFile

type KVFile struct {
	/* The path / key of the file */
	Path string
	/* The value of the key */
	Value string
	/* The KVStore provider */
	StoreKV config.KVStore
}

func (*KVFile) Allocate

func (f *KVFile) Allocate(off uint64, size uint64, mode uint32) (code fuse.Status)

func (*KVFile) Chmod

func (f *KVFile) Chmod(perms uint32) fuse.Status

func (*KVFile) Chown

func (f *KVFile) Chown(uid uint32, gid uint32) fuse.Status

func (*KVFile) Flush

func (f *KVFile) Flush() fuse.Status

func (*KVFile) Fsync

func (f *KVFile) Fsync(flags int) (code fuse.Status)

func (*KVFile) GetAttr

func (f *KVFile) GetAttr(attr *fuse.Attr) fuse.Status

func (*KVFile) InnerFile

func (f *KVFile) InnerFile() nodefs.File

func (*KVFile) Read

func (f *KVFile) Read(buf []byte, off int64) (fuse.ReadResult, fuse.Status)

func (*KVFile) Release

func (f *KVFile) Release()

func (*KVFile) SetInode

func (f *KVFile) SetInode(node *nodefs.Inode)

func (*KVFile) String

func (f *KVFile) String() string

func (*KVFile) Truncate

func (f *KVFile) Truncate(size uint64) fuse.Status

func (*KVFile) Utimens

func (f *KVFile) Utimens(atime *time.Time, mtime *time.Time) fuse.Status

func (*KVFile) Write

func (f *KVFile) Write(data []byte, off int64) (uint32, fuse.Status)

We do not allow writing for the file. This should be handled at the K/V end and not by the client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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