fusefs

package
v0.0.0-...-371cdc4 Latest Latest
Warning

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

Go to latest
Published: May 15, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DIRENT_OFFSET_EOF = 0xFFFFFFFFFFFFFFFF
View Source
const DURATION_DEFAULT time.Duration = time.Duration(1000000000 * 60 * 60)
View Source
const FUSE_ROOT_ID fuse.NodeID = 1
View Source
const FUSE_UNKNOWN_INO fuse.NodeID = 0xffffffff

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Conn       *fuse.Conn
	MountPoint string
	ReadOnly   bool
	Mount      *storage.MountView
	// contains filtered or unexported fields
}

func (*Connection) Close

func (conn *Connection) Close() error

func (*Connection) GetInode

func (conn *Connection) GetInode(inodeId fuse.NodeID) (*storage.InodeData, error)

func (*Connection) OpenHandle

func (conn *Connection) OpenHandle(handle Handle) fuse.HandleID

func (*Connection) Serve

func (conn *Connection) Serve() error

type FileHandleDir

type FileHandleDir struct {
	Conn *Connection
	storage.InodeId
	*storage.DirView

	Offset    uint64
	OffsetKey string
}

func (*FileHandleDir) Read

func (h *FileHandleDir) Read(req *fuse.ReadRequest) error

func (*FileHandleDir) Release

func (h *FileHandleDir) Release(req *fuse.ReleaseRequest) error

func (*FileHandleDir) Write

func (h *FileHandleDir) Write(req *fuse.WriteRequest) error

type FileHandleReg

type FileHandleReg struct {
	Conn *Connection
	storage.InodeId
	storage.FileView
}

func (*FileHandleReg) Read

func (h *FileHandleReg) Read(req *fuse.ReadRequest) error

func (*FileHandleReg) Release

func (h *FileHandleReg) Release(req *fuse.ReleaseRequest) error

func (*FileHandleReg) Write

func (h *FileHandleReg) Write(req *fuse.WriteRequest) error

type FuseError

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

func WrapIOError

func WrapIOError(err error) FuseError

func (FuseError) Errno

func (err FuseError) Errno() fuse.Errno

func (FuseError) Error

func (err FuseError) Error() string

type Handle

type Handle interface {
	Read(*fuse.ReadRequest) error
	Write(*fuse.WriteRequest) error
	Release(*fuse.ReleaseRequest) error
}

type Server

type Server struct {
	Storage *storage.StorageContext
	// contains filtered or unexported fields
}

func CreateDefaultServer

func CreateDefaultServer() (*Server, error)

func CreateServer

func CreateServer(basePath string) (*Server, error)

func CreateServerWithStorage

func CreateServerWithStorage(sc *storage.StorageContext) *Server

func (*Server) Close

func (srv *Server) Close() error

Unmounts all mounts that were created under this server and waits for their connections to close. The releases all storage resources. If unmount fails on any mount this may exit with a non-nil error without releasing all held resources. Close() blocks until all underlying connections exit.

func (*Server) Mount

func (srv *Server) Mount(mountPoint string, contentAddress []byte, readOnly bool, options ...fuse.MountOption) error

Jump to

Keyboard shortcuts

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