mount

package
v0.0.0-...-61472b1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsInode

func AsInode(path string) uint64

func HashStringToLong

func HashStringToLong(dir string) (v int64)

Types

type Dir

type Dir struct {
	Name      string
	XiaoyaoFs *XiaoyaoFs

	Entry *master.Entry
	// contains filtered or unexported fields
}

func (*Dir) Attr

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

func (*Dir) Create

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

func (*Dir) Forget

func (dir *Dir) Forget()

func (*Dir) Fsync

func (d *Dir) Fsync(ctx context.Context, req *fuse.FsyncRequest) error

func (*Dir) FullPath

func (dir *Dir) FullPath() string

func (*Dir) Getxattr

func (d *Dir) Getxattr(ctx context.Context, req *fuse.GetxattrRequest, resp *fuse.GetxattrResponse) error

func (*Dir) Listxattr

func (dir *Dir) Listxattr(ctx context.Context, req *fuse.ListxattrRequest, resp *fuse.ListxattrResponse) error

func (*Dir) Lookup

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

func (*Dir) Mkdir

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

func (*Dir) ReadDirAll

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

func (*Dir) Remove

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

func (*Dir) Removexattr

func (dir *Dir) Removexattr(ctx context.Context, req *fuse.RemovexattrRequest) error

func (*Dir) Rename

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

func (*Dir) Setattr

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

func (*Dir) Setxattr

func (dir *Dir) Setxattr(ctx context.Context, req *fuse.SetxattrRequest) error

type File

type File struct {
	Name      string
	XiaoyaoFs *XiaoyaoFs
	Dir       *Dir

	Entry *master.Entry
	// contains filtered or unexported fields
}

func (*File) Attr

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

func (*File) Forget

func (file *File) Forget()

func (*File) Fsync

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

func (*File) Getxattr

func (file *File) Getxattr(ctx context.Context, req *fuse.GetxattrRequest, resp *fuse.GetxattrResponse) error

func (*File) Listxattr

func (file *File) Listxattr(ctx context.Context, req *fuse.ListxattrRequest, resp *fuse.ListxattrResponse) error

func (*File) Open

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

func (*File) Removexattr

func (file *File) Removexattr(ctx context.Context, req *fuse.RemovexattrRequest) error

func (*File) Setattr

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

func (*File) Setxattr

func (file *File) Setxattr(ctx context.Context, req *fuse.SetxattrRequest) error

type FileHandle

type FileHandle struct {
	F         *File
	RequestId fuse.RequestID
	NodeId    fuse.NodeID
	Handle    uint64
	Uid       uint32
	Gid       uint32
	sync.RWMutex
}

func NewFileHandle

func NewFileHandle(file *File, uid, gid uint32) *FileHandle

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

type XiaoyaoFs

type XiaoyaoFs struct {
	MasterHost string
	MasterPort int
	// contains filtered or unexported fields
}

func NewXiaoyaoFs

func NewXiaoyaoFs(c *config.Config) *XiaoyaoFs

func (*XiaoyaoFs) AcquireHandle

func (x *XiaoyaoFs) AcquireHandle(file *File, uid, gid uint32) (fileHandle *FileHandle, err error)

func (*XiaoyaoFs) ReleaseHandle

func (x *XiaoyaoFs) ReleaseHandle(fullpath string, id fuse.HandleID)

func (*XiaoyaoFs) Root

func (x *XiaoyaoFs) Root() (fs.Node, error)

Jump to

Keyboard shortcuts

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