fuse

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultFuseDriveName = "Space"

Functions

This section is empty.

Types

type Controller

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

Controller is the space domain controller for managing the VFS. It is used by the grpc server and app/daemon generally

func NewController

func NewController(
	ctx context.Context,
	cfg config.Config,
	store store.Store,
	sfs *spacefs.SpaceFS,
	install installer.FuseInstaller,
) *Controller

func (*Controller) GetFuseState added in v0.1.3

func (s *Controller) GetFuseState(ctx context.Context) (State, error)

func (*Controller) GetMountPath added in v0.1.3

func (s *Controller) GetMountPath() string

func (*Controller) IsMounted

func (s *Controller) IsMounted() bool

func (*Controller) Mount

func (s *Controller) Mount() error

Mount mounts the vfs drive and immediately serves the handler. It starts the Fuse Server in the background

func (*Controller) ShouldMount

func (s *Controller) ShouldMount() bool

ShouldMount check the store and config to determine if the VFS drive was previously mounted

func (*Controller) Shutdown

func (s *Controller) Shutdown() error

func (*Controller) Unmount

func (s *Controller) Unmount() error

type State added in v0.1.3

type State string
const (
	UNSUPPORTED   State = "UNSUPPORTED"
	NOT_INSTALLED State = "NOT_INSTALLED"
	UNMOUNTED     State = "UNMOUNTED"
	MOUNTED       State = "MOUNTED"
	ERROR         State = "ERROR"
)

type VFS added in v0.0.9

type VFS interface {
	Mount(mountPath, fsName string) error
	IsMounted() bool
	// Serve should be a blocking call and return only on unmount or shutdown
	Serve() error
	Unmount() error
}

VFS represents the handler for virtually mounted drives. it is implemented using FUSE for linux and macOS and will use dokany for windows

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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