stofuse

package
v0.0.0-...-df9e1a0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Overview

FUSE adapter for interfacing with Varasto from filesystem

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Entrypoint

func Entrypoint() *cobra.Command

func NewByIdDir

func NewByIdDir(srv *FsServer) *byIdDir

func NewDirAdapter

func NewDirAdapter(dirID string, srv *FsServer) *dirAdapter

func NewDirByIDQuery

func NewDirByIDQuery(srv *FsServer) *dirByIDQuery

Types

type BlobCache

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

func NewBlobCache

func NewBlobCache(clientConfig stoclient.ClientConfig, logl *logex.Leveled) *BlobCache

func (*BlobCache) Get

func (b *BlobCache) Get(ctx context.Context, ref stotypes.BlobRef, collectionId string) (*BlobData, error)

type BlobData

type BlobData struct {
	Ref  stotypes.BlobRef
	Data []byte
}

type CollectionDirNode

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

func NewCollectionDirNode

func NewCollectionDirNode(
	collection *stotypes.Collection,
	fullPathFromRoot string,
	inode uint64,
	filesCommitted []*CollectionDirNodeFile,
	subdirsCommitted []*CollectionDirNode,
) *CollectionDirNode

func (*CollectionDirNode) Attr

func (*CollectionDirNode) Create

creates a file (mkdir has separate func)

func (*CollectionDirNode) Lookup

func (d *CollectionDirNode) Lookup(ctx context.Context, name string) (fs.Node, error)

func (*CollectionDirNode) Mkdir

func (d *CollectionDirNode) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, error)

func (*CollectionDirNode) ReadDirAll

func (d *CollectionDirNode) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)

func (*CollectionDirNode) Remove

func (*CollectionDirNode) Rename

func (d *CollectionDirNode) Rename(ctx context.Context, req *fuse.RenameRequest, newDir fs.Node) error

type CollectionDirNodeFile

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

func NewCollectionDirNodeFile

func NewCollectionDirNodeFile(
	name string,
	inode uint64,
	file stotypes.File,
	collectionId string,
	srv *FsServer,
) *CollectionDirNodeFile

func (CollectionDirNodeFile) Attr

func (f CollectionDirNodeFile) Attr(ctx context.Context, attrs *fuse.Attr) error

func (CollectionDirNodeFile) Read

type FsServer

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

func NewFsServer

func NewFsServer(client *stoclient.Client, fuseMountPath string, logl *logex.Leveled) *FsServer

func (*FsServer) AbsoluteSymlinkUnderFUSEMount

func (f *FsServer) AbsoluteSymlinkUnderFUSEMount(component0 string, components ...string) string

absolute paths are better because relative ones don't seem to work over multiple symlink levels (or something else level-dependent breaks on them..)

type VarastoFSRoot

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

TODO: make the root return "backup exclude" xattr

func NewVarastoFSRoot

func NewVarastoFSRoot(entries []stoEntry, srv *FsServer) (*VarastoFSRoot, error)

func (*VarastoFSRoot) Attr

func (v *VarastoFSRoot) Attr(ctx context.Context, a *fuse.Attr) error

func (*VarastoFSRoot) Lookup

func (v *VarastoFSRoot) Lookup(ctx context.Context, name string) (fs.Node, error)

func (*VarastoFSRoot) ReadDirAll

func (v *VarastoFSRoot) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)

func (*VarastoFSRoot) Root

func (v *VarastoFSRoot) Root() (fs.Node, error)

implements fs.FS

Directories

Path Synopsis
Client for FUSE server's API
Client for FUSE server's API
This entrypoint is in own package, so we don't need to sprinkle conditional compilation all around the base "stofuse" package because it doesn't compile on Windows
This entrypoint is in own package, so we don't need to sprinkle conditional compilation all around the base "stofuse" package because it doesn't compile on Windows

Jump to

Keyboard shortcuts

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