filesys

package
v0.0.0-...-d8c34b0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2019 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContinuousDirtyPages

type ContinuousDirtyPages struct {
	Offset int64
	Size   int64
	Data   []byte
	// contains filtered or unexported fields
}

func (*ContinuousDirtyPages) AddPage

func (pages *ContinuousDirtyPages) AddPage(ctx context.Context, offset int64, data []byte) (chunks []*filer_pb.FileChunk, err error)

func (*ContinuousDirtyPages) FlushToStorage

func (pages *ContinuousDirtyPages) FlushToStorage(ctx context.Context) (chunk *filer_pb.FileChunk, err error)

type Dir

type Dir struct {
	Path string
	// contains filtered or unexported fields
}

func (*Dir) Attr

func (dir *Dir) Attr(ctx context.Context, attr *fuse.Attr) error

func (*Dir) Create

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

func (*Dir) Lookup

func (dir *Dir) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.LookupResponse) (node fs.Node, err error)

func (*Dir) Mkdir

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

func (*Dir) ReadDirAll

func (dir *Dir) ReadDirAll(ctx context.Context) (ret []fuse.Dirent, err error)

func (*Dir) Remove

func (dir *Dir) Remove(ctx context.Context, req *fuse.RemoveRequest) error

func (*Dir) Rename

func (dir *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, newDirectory fs.Node) error

func (*Dir) Setattr

func (dir *Dir) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error
func (dir *Dir) Symlink(ctx context.Context, req *fuse.SymlinkRequest) (fs.Node, error)

type File

type File struct {
	Name string
	// contains filtered or unexported fields
}

func (*File) Attr

func (file *File) Attr(ctx context.Context, attr *fuse.Attr) error

func (*File) Fsync

func (file *File) Fsync(ctx context.Context, req *fuse.FsyncRequest) error

func (*File) Open

func (file *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)
func (file *File) Readlink(ctx context.Context, req *fuse.ReadlinkRequest) (string, error)

func (*File) Setattr

func (file *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error

type FileHandle

type FileHandle struct {
	RequestId fuse.RequestID // unique ID for request
	NodeId    fuse.NodeID    // file or directory the request is about
	Uid       uint32         // user ID of process making request
	Gid       uint32         // group ID of process making request
	// contains filtered or unexported fields
}

func (*FileHandle) Flush

func (fh *FileHandle) Flush(ctx context.Context, req *fuse.FlushRequest) error

func (*FileHandle) Read

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

func (*FileHandle) Release

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

func (*FileHandle) Write

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

Write to the file handle

type Option

type Option struct {
	FilerGrpcAddress   string
	GrpcDialOption     grpc.DialOption
	FilerMountRootPath string
	Collection         string
	Replication        string
	TtlSec             int32
	ChunkSizeLimit     int64
	DataCenter         string
	DirListingLimit    int
	EntryCacheTtl      time.Duration
	Umask              os.FileMode

	MountUid   uint32
	MountGid   uint32
	MountMode  os.FileMode
	MountCtime time.Time
	MountMtime time.Time
}

type WFS

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

func NewSeaweedFileSystem

func NewSeaweedFileSystem(option *Option) *WFS

func (*WFS) AcquireHandle

func (wfs *WFS) AcquireHandle(file *File, uid, gid uint32) (fileHandle *FileHandle)

func (*WFS) ReleaseHandle

func (wfs *WFS) ReleaseHandle(fullpath string, handleId fuse.HandleID)

func (*WFS) Root

func (wfs *WFS) Root() (fs.Node, error)

func (*WFS) Statfs

func (wfs *WFS) Statfs(ctx context.Context, req *fuse.StatfsRequest, resp *fuse.StatfsResponse) error

Statfs is called to obtain file system metadata. Implements fuse.FSStatfser

func (*WFS) WithFilerClient

func (wfs *WFS) WithFilerClient(ctx context.Context, fn func(filer_pb.SeaweedFilerClient) error) error

Jump to

Keyboard shortcuts

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