fuse

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: GPL-3.0 Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	MaxAppendFileSize = 10485760 // 10Mb
)
View Source
const (
	Swarmfs_Version = "0.1"
)

Variables

This section is empty.

Functions

func NewInode

func NewInode() uint64

Inode numbers need to be unique, they are used for caching inside fuse

Types

type MountInfo

type MountInfo struct {
	MountPoint     string
	StartManifest  string
	LatestManifest string
	// contains filtered or unexported fields
}

information about every active mount

func NewMountInfo

func NewMountInfo(mhash, mpoint string, sapi *api.Api) *MountInfo

type SwarmDir

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

func NewSwarmDir

func NewSwarmDir(fullpath string, minfo *MountInfo) *SwarmDir

func (*SwarmDir) Attr

func (sd *SwarmDir) Attr(ctx context.Context, a *fuse.Attr) error

func (*SwarmDir) Create

func (sd *SwarmDir) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error)

func (*SwarmDir) Lookup

func (sd *SwarmDir) Lookup(ctx context.Context, req *fuse.LookupRequest, resp *fuse.LookupResponse) (fs.Node, error)

func (*SwarmDir) Mkdir

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

func (*SwarmDir) ReadDirAll

func (sd *SwarmDir) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)

func (*SwarmDir) Remove

func (sd *SwarmDir) Remove(ctx context.Context, req *fuse.RemoveRequest) error

type SwarmFS

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

func NewSwarmFS

func NewSwarmFS(api *api.Api) *SwarmFS

func (*SwarmFS) Listmounts

func (self *SwarmFS) Listmounts() []*MountInfo

func (*SwarmFS) Mount

func (self *SwarmFS) Mount(mhash, mountpoint string) (*MountInfo, error)

func (*SwarmFS) Stop

func (self *SwarmFS) Stop() bool

func (*SwarmFS) Unmount

func (self *SwarmFS) Unmount(mountpoint string) (*MountInfo, error)

type SwarmFile

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

func NewSwarmFile

func NewSwarmFile(path, fname string, minfo *MountInfo) *SwarmFile

func (*SwarmFile) Attr

func (file *SwarmFile) Attr(ctx context.Context, a *fuse.Attr) error

func (*SwarmFile) Read

func (sf *SwarmFile) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error

func (*SwarmFile) Write

func (sf *SwarmFile) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error

type SwarmRoot

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

func (*SwarmRoot) Root

func (filesystem *SwarmRoot) Root() (fs.Node, error)

Jump to

Keyboard shortcuts

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