Documentation ¶
Index ¶
- func AsInode(path string) uint64
- func HashStringToLong(dir string) (v int64)
- type Dir
- func (d *Dir) Attr(ctx context.Context, attr *fuse.Attr) error
- func (d *Dir) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error)
- func (dir *Dir) Forget()
- func (d *Dir) Fsync(ctx context.Context, req *fuse.FsyncRequest) error
- func (dir *Dir) FullPath() string
- func (d *Dir) Getxattr(ctx context.Context, req *fuse.GetxattrRequest, resp *fuse.GetxattrResponse) error
- func (dir *Dir) Listxattr(ctx context.Context, req *fuse.ListxattrRequest, resp *fuse.ListxattrResponse) error
- func (d *Dir) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.LookupResponse) (node fs.Node, err error)
- func (d *Dir) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, error)
- func (d *Dir) ReadDirAll(ctx context.Context) (dirents []fuse.Dirent, err error)
- func (d *Dir) Remove(ctx context.Context, req *fuse.RemoveRequest) error
- func (dir *Dir) Removexattr(ctx context.Context, req *fuse.RemovexattrRequest) error
- func (d *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, newDirectory fs.Node) error
- func (d *Dir) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error
- func (dir *Dir) Setxattr(ctx context.Context, req *fuse.SetxattrRequest) error
- type File
- func (f *File) Attr(ctx context.Context, attr *fuse.Attr) (err error)
- func (file *File) Forget()
- func (file *File) Fsync(ctx context.Context, req *fuse.FsyncRequest) error
- func (file *File) Getxattr(ctx context.Context, req *fuse.GetxattrRequest, resp *fuse.GetxattrResponse) error
- func (file *File) Listxattr(ctx context.Context, req *fuse.ListxattrRequest, resp *fuse.ListxattrResponse) error
- func (f *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)
- func (file *File) Removexattr(ctx context.Context, req *fuse.RemovexattrRequest) error
- func (file *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error
- func (file *File) Setxattr(ctx context.Context, req *fuse.SetxattrRequest) error
- type FileHandle
- type XiaoyaoFs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashStringToLong ¶
Types ¶
type Dir ¶
type Dir struct { Name string XiaoyaoFs *XiaoyaoFs Entry *master.Entry // contains filtered or unexported fields }
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) ReadDirAll ¶
func (*Dir) Removexattr ¶
func (*Dir) Setattr ¶
func (d *Dir) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error
type File ¶
type File struct { Name string XiaoyaoFs *XiaoyaoFs Dir *Dir Entry *master.Entry // contains filtered or unexported fields }
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) Setattr ¶
func (file *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) 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 (*XiaoyaoFs) AcquireHandle ¶
func (x *XiaoyaoFs) AcquireHandle(file *File, uid, gid uint32) (fileHandle *FileHandle, err error)
func (*XiaoyaoFs) ReleaseHandle ¶
Click to show internal directories.
Click to hide internal directories.