Documentation ¶
Index ¶
- type LoopbackNode
- func (n *LoopbackNode) Create(ctx context.Context, name string, flags uint32, mode uint32, ...) (*fs.Inode, fs.FileHandle, uint32, syscall.Errno)
- func (n *LoopbackNode) Flush(ctx context.Context, fh fs.FileHandle) syscall.Errno
- func (n *LoopbackNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (n *LoopbackNode) Open(ctx context.Context, flags uint32) (fs.FileHandle, uint32, syscall.Errno)
- func (n *LoopbackNode) Readlink(ctx context.Context) ([]byte, syscall.Errno)
- type SlimFS
- func (sfs *SlimFS) CacheFS() string
- func (sfs *SlimFS) Cleanup(keepCache bool)
- func (sfs *SlimFS) InitLoopbackRoot(rootPath string, updates chan Update, readOnly bool) error
- func (sfs *SlimFS) MountedPath(path string) string
- func (sfs *SlimFS) RootFS() string
- func (sfs *SlimFS) RunCommand(command, workdir string) error
- type Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoopbackNode ¶
type LoopbackNode struct {
fs.LoopbackNode
}
func (*LoopbackNode) Flush ¶
func (n *LoopbackNode) Flush(ctx context.Context, fh fs.FileHandle) syscall.Errno
Flush is called for the close(2) call, could be multiple times. See: https://github.com/hanwen/go-fuse/blob/aff07cbd88fef6a2561a87a1e43255516ba7d4b6/fs/api.go#L369
func (*LoopbackNode) Lookup ¶
func (n *LoopbackNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
Lookup is the event when a path is being looked for. When it is found, then we see open.
type SlimFS ¶
type SlimFS struct { Server *fuse.Server // Mountpoint has /root and /cache under it MountPoint string // Output file, if defined, to save events Outfile string }
func NewSlimFS ¶
NewSlimFS returns a new wrapper to a fuse.Server We mount a fusefs to a temporary directory The server returned (if not nil) needs to be correctly handled - see how it is used here in the library If recorder is true, we instantiate a recording base
func (*SlimFS) InitLoopbackRoot ¶
InitLoopbackRoot creates a fuse.Server
func (*SlimFS) MountedPath ¶
MountedPath returns the path in the context of the fuse mount.
func (*SlimFS) RunCommand ¶
RunComand to the fuse filesystem