svfs

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2016 License: Apache-2.0 Imports: 11 Imported by: 6

Documentation

Index

Constants

View Source
const (
	DirContentType = "application/directory"
	ObjContentType = "application/octet-stream"
)
View Source
const (
	ManifestHeader = "X-Object-Manifest"
)
View Source
const (
	SegmentContainerSuffix = "_segments"
)

Variables

View Source
var (
	FolderRegex      = regexp.MustCompile("^.+/$")
	SubdirRegex      = regexp.MustCompile(".*/.*$")
	SegmentPathRegex = regexp.MustCompile("^([^/]+)/(.*)$")
	DirectoryCache   = new(Cache)
	DirectoryLister  = new(DirLister)
)
View Source
var SegmentRegex = regexp.MustCompile("^.+_segments$")
View Source
var (
	SegmentSize uint64
)
View Source
var (
	SwiftConnection *swift.Connection
)

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) AddAll added in v0.3.0

func (c *Cache) AddAll(container, path string, node Node, nodes map[string]Node)

func (*Cache) Delete added in v0.2.6

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

func (*Cache) DeleteAll added in v0.3.0

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

func (*Cache) Get added in v0.2.6

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

func (*Cache) GetAll added in v0.3.0

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

func (*Cache) Peek added in v0.3.0

func (c *Cache) Peek(container, path string) (Node, bool)

func (*Cache) Set added in v0.2.6

func (c *Cache) Set(container, path, name string, node Node)

type CacheConfig added in v0.2.6

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

type CacheValue added in v0.3.0

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

type Config added in v0.2.6

type Config struct {
	Container             string
	ConnectTimeout        time.Duration
	ReadAheadSize         uint
	SegmentSizeMB         uint64
	MaxReaddirConcurrency uint64
	MaxUploadConcurrency  uint64
}

type Container

type Container struct {
	*Directory
}

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) (direntries []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) 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) (err 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) (direntries []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