fuse

package
v1.999.0-test Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FsEntry

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

FsEntry is a node in the filesystem

type M

type M struct {
	Volume struct {
		Files metrics.FilesMetrics `group:"files" description:"metrics about fuse files (mount)"`
		IO    metrics.IOMetrics    `group:"io" description:"metrics about fuse IO operations"`
	} `group:"volumetry" description:""`
	Usage metrics.UsageMetrics `group:"telemetry" description:"usage stats for the fuse package"`
}

M describes metrics for the fuse package

type MountOption

type MountOption func(*fuse.MountConfig)

MountOption enables options when mounting the file system

TODO plumb additional mount options

type MountableFS

type MountableFS interface {
	Mount(string, ...MountOption) error
	Unmount(string) error
}

MountableFS knows how to mount and unmount a file system

type MutableFS

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

MutableFS is the virtual mutable filesystem created on top of a bundle.

func NewMutableFS

func NewMutableFS(bundle *core.Bundle, opts ...Option) (*MutableFS, error)

NewMutableFS creates a new instance of the mutable datamon filesystem.

func (*MutableFS) Commit

func (dfs *MutableFS) Commit() error

Commit changes on a MutableFS

func (*MutableFS) JoinMount

func (dfs *MutableFS) JoinMount(ctx context.Context) error

JoinMount blocks until a mounted file system has been unmounted. It does not return successfully until all ops read from the connection have been responded to (i.e. the file system server has finished processing all in-flight ops).

func (*MutableFS) Mount

func (dfs *MutableFS) Mount(path string, opts ...MountOption) error

Mount a MutableFS as mutable (read-write)

func (*MutableFS) MountMutable

func (dfs *MutableFS) MountMutable(path string, opts ...MountOption) error

MountMutable mounts a MutableFS as mutable (read-write)

func (*MutableFS) Unmount

func (dfs *MutableFS) Unmount(path string) error

Unmount a MutableFS

type Option

type Option func(fuseutil.FileSystem)

Option for the file system

func CacheSize

func CacheSize(size int) Option

CacheSize tunes the buffer cache size in bytes of streamed FS operations (enabled when Streamed is true).

func Logger

func Logger(l *zap.Logger) Option

Logger for this file system

func Prefetch

func Prefetch(ahead int) Option

Prefetch enables prefetching on streamed FS operations (enabled when Streamed is true).

func Streaming

func Streaming(s bool) Option

Streaming sets the streaming option flag for a bundle (RO mount only)

func VerifyHash

func VerifyHash(enabled bool) Option

VerifyHash enables hash verification on streamed FS read perations (enabled when Streamed is true).

func WithMetrics

func WithMetrics(enabled bool) Option

WithMetrics toggles metrics on the fuse package

type ReadOnlyFS

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

ReadOnlyFS is the virtual read-only filesystem created on top of a bundle.

func NewReadOnlyFS

func NewReadOnlyFS(bundle *core.Bundle, opts ...Option) (*ReadOnlyFS, error)

NewReadOnlyFS creates a new instance of the datamon filesystem.

func (*ReadOnlyFS) JoinMount

func (dfs *ReadOnlyFS) JoinMount(ctx context.Context) error

JoinMount blocks until a mounted file system has been unmounted. It does not return successfully until all ops read from the connection have been responded to (i.e. the file system server has finished processing all in-flight ops).

func (*ReadOnlyFS) Mount

func (dfs *ReadOnlyFS) Mount(path string, opts ...MountOption) error

Mount a ReadOnlyFS

func (*ReadOnlyFS) MountReadOnly

func (dfs *ReadOnlyFS) MountReadOnly(path string, opts ...MountOption) error

MountReadOnly a ReadOnlyFS

func (*ReadOnlyFS) Unmount

func (dfs *ReadOnlyFS) Unmount(path string) error

Unmount a ReadOnlyFS

Directories

Path Synopsis
Package mocks provides some common utilities to test the fuse functionality
Package mocks provides some common utilities to test the fuse functionality
Package status exports errors produced by the fuse package.
Package status exports errors produced by the fuse package.

Jump to

Keyboard shortcuts

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