svfs

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2016 License: Apache-2.0 Imports: 12 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FolderRegex     = regexp.MustCompile("^.+/$")
	DirContentType  = "application/directory"
	ObjContentType  = "application/octet-stream"
	EntryCache      = new(Cache)
	DirectoryLister = new(DirLister)
)
View Source
var SegmentRegex = regexp.MustCompile("^.+_segments$")

Functions

This section is empty.

Types

type Cache added in v0.2.6

type Cache struct {
	// contains filtered or unexported fields
}

func NewCache added in v0.2.6

func NewCache(cconf *CacheConfig) *Cache

func (*Cache) Delete added in v0.2.6

func (c *Cache) Delete(container, path string)

func (*Cache) Get added in v0.2.6

func (c *Cache) Get(container, path string) []Node

func (*Cache) Set added in v0.2.6

func (c *Cache) Set(container, path string, list []Node)

type CacheConfig added in v0.2.6

type CacheConfig struct {
	Timeout    time.Duration
	MaxEntries int64
	MaxAccess  int64
}

type CacheEntry added in v0.2.6

type CacheEntry struct {
	// contains filtered or unexported fields
}

type Config added in v0.2.6

type Config struct {
	Container             string
	ConnectTimeout        time.Duration
	MaxReaddirConcurrency uint64
}

type Container

type Container struct {
	*Directory
	// contains filtered or unexported fields
}

func (*Container) Attr

func (c *Container) Attr(ctx context.Context, a *fuse.Attr) error

type DirLister added in v0.2.6

type DirLister struct {
	// contains filtered or unexported fields
}

func (*DirLister) AddTask added in v0.2.6

func (dl *DirLister) AddTask(o *Object, c chan<- *Object)

func (*DirLister) Start added in v0.2.6

func (dl *DirLister) Start()

type DirListerTask added in v0.2.6

type DirListerTask struct {
	// contains filtered or unexported fields
}

type Directory

type Directory struct {
	// contains filtered or unexported fields
}

func (*Directory) Attr

func (d *Directory) Attr(ctx context.Context, a *fuse.Attr) error

func (*Directory) Create

func (d *Directory) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error)

func (*Directory) Export

func (d *Directory) Export() fuse.Dirent

func (*Directory) Lookup

func (d *Directory) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.LookupResponse) (fs.Node, error)

func (*Directory) Mkdir added in v0.2.0

func (d *Directory) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, error)

func (*Directory) Name

func (d *Directory) Name() string

func (*Directory) ReadDirAll

func (d *Directory) ReadDirAll(ctx context.Context) (entries []fuse.Dirent, err error)

func (*Directory) Remove

func (d *Directory) Remove(ctx context.Context, req *fuse.RemoveRequest) error

func (*Directory) Rename

func (d *Directory) Rename(ctx context.Context, req *fuse.RenameRequest, newDir fs.Node) error

type Node

type Node interface {
	Name() string
	Export() fuse.Dirent
}

type Object

type Object struct {
	// contains filtered or unexported fields
}

func (*Object) Attr

func (o *Object) Attr(ctx context.Context, a *fuse.Attr) error

func (*Object) Export

func (o *Object) Export() fuse.Dirent

func (*Object) Name

func (o *Object) Name() string

func (*Object) Open

func (o *Object) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)

type ObjectHandle

type ObjectHandle struct {
	// contains filtered or unexported fields
}

func (*ObjectHandle) Read

func (fh *ObjectHandle) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error

func (*ObjectHandle) ReadAll

func (fh *ObjectHandle) ReadAll(ctx context.Context) ([]byte, error)

func (*ObjectHandle) Release

func (fh *ObjectHandle) Release(ctx context.Context, req *fuse.ReleaseRequest) error

func (*ObjectHandle) Write

func (fh *ObjectHandle) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error

type Root

type Root struct {
	*Directory
}

func (*Root) Create

func (r *Root) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error)

func (*Root) Lookup added in v0.2.5

func (r *Root) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.LookupResponse) (fs.Node, error)

func (*Root) Mkdir added in v0.2.0

func (r *Root) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, error)

func (*Root) ReadDirAll

func (r *Root) ReadDirAll(ctx context.Context) (entries []fuse.Dirent, err error)

func (*Root) Remove

func (r *Root) Remove(ctx context.Context, req *fuse.RemoveRequest) error

func (*Root) Rename

func (r *Root) Rename(ctx context.Context, req *fuse.RenameRequest, newDir fs.Node) error

type SVFS

type SVFS struct {
	// contains filtered or unexported fields
}

SVFS implements the Swift Virtual File System.

func (*SVFS) Init

func (s *SVFS) Init(sc *swift.Connection, conf *Config, cconf *CacheConfig) error

func (*SVFS) Root

func (s *SVFS) Root() (fs.Node, error)

Jump to

Keyboard shortcuts

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