Documentation
¶
Overview ¶
Guest FUSE daemon using go-fuse library Connects to host VFS server over vsock and mounts at configurable workspace
Index ¶
- Constants
- Variables
- func Run()
- type OpCode
- type VFSClient
- type VFSDirEntry
- type VFSFileHandle
- func (h *VFSFileHandle) Fsync(ctx context.Context, flags uint32) syscall.Errno
- func (h *VFSFileHandle) Getattr(ctx context.Context, out *fuse.AttrOut) syscall.Errno
- func (h *VFSFileHandle) Read(ctx context.Context, dest []byte, off int64) (fuse.ReadResult, syscall.Errno)
- func (h *VFSFileHandle) Release(ctx context.Context) syscall.Errno
- func (h *VFSFileHandle) Write(ctx context.Context, data []byte, off int64) (uint32, syscall.Errno)
- type VFSNode
- func (n *VFSNode) Create(ctx context.Context, name string, flags uint32, mode uint32, ...) (inode *fs.Inode, fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
- func (n *VFSNode) Getattr(ctx context.Context, fh fs.FileHandle, out *fuse.AttrOut) syscall.Errno
- func (n *VFSNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (n *VFSNode) Mkdir(ctx context.Context, name string, mode uint32, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (n *VFSNode) Open(ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
- func (n *VFSNode) Readdir(ctx context.Context) (fs.DirStream, syscall.Errno)
- func (n *VFSNode) Rename(ctx context.Context, name string, newParent fs.InodeEmbedder, newName string, ...) syscall.Errno
- func (n *VFSNode) Rmdir(ctx context.Context, name string) syscall.Errno
- func (n *VFSNode) Setattr(ctx context.Context, fh fs.FileHandle, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno
- func (n *VFSNode) Unlink(ctx context.Context, name string) syscall.Errno
- type VFSRequest
- type VFSResponse
- type VFSRoot
- func (r *VFSRoot) Create(ctx context.Context, name string, flags uint32, mode uint32, ...) (inode *fs.Inode, fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
- func (r *VFSRoot) Getattr(ctx context.Context, fh fs.FileHandle, out *fuse.AttrOut) syscall.Errno
- func (r *VFSRoot) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (r *VFSRoot) Mkdir(ctx context.Context, name string, mode uint32, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (r *VFSRoot) Readdir(ctx context.Context) (fs.DirStream, syscall.Errno)
- func (r *VFSRoot) Rename(ctx context.Context, name string, newParent fs.InodeEmbedder, newName string, ...) syscall.Errno
- func (r *VFSRoot) Rmdir(ctx context.Context, name string) syscall.Errno
- func (r *VFSRoot) Unlink(ctx context.Context, name string) syscall.Errno
- type VFSStat
Constants ¶
View Source
const ( AF_VSOCK = 40 VMADDR_CID_HOST = 2 VsockPortVFS = 5001 )
Variables ¶
Functions ¶
Types ¶
type VFSClient ¶
type VFSClient struct {
// contains filtered or unexported fields
}
VFSClient communicates with host VFS server over vsock
func NewVFSClient ¶
func (*VFSClient) Request ¶
func (c *VFSClient) Request(req *VFSRequest) (*VFSResponse, error)
func (*VFSClient) RequestCtx ¶
func (c *VFSClient) RequestCtx(ctx context.Context, req *VFSRequest) (*VFSResponse, error)
type VFSDirEntry ¶
type VFSFileHandle ¶
type VFSFileHandle struct {
// contains filtered or unexported fields
}
VFSFileHandle handles read/write operations on open files
type VFSNode ¶
VFSNode represents a file or directory in the VFS
type VFSRequest ¶
type VFSRequest struct {
Op OpCode `cbor:"op"`
Path string `cbor:"path,omitempty"`
NewPath string `cbor:"new_path,omitempty"`
Handle uint64 `cbor:"fh,omitempty"`
Offset int64 `cbor:"off,omitempty"`
Size uint32 `cbor:"sz,omitempty"`
Data []byte `cbor:"data,omitempty"`
Flags uint32 `cbor:"flags,omitempty"`
Mode uint32 `cbor:"mode,omitempty"`
UID uint32 `cbor:"uid,omitempty"`
GID uint32 `cbor:"gid,omitempty"`
}
type VFSResponse ¶
Click to show internal directories.
Click to hide internal directories.