fuse

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2020 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobSizeCache

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

BlobSizeCache caches the size of blobs in the repo.

func NewBlobSizeCache

func NewBlobSizeCache(ctx context.Context, idx restic.Index) *BlobSizeCache

NewBlobSizeCache returns a new blob size cache containing all entries from midx.

func (*BlobSizeCache) Lookup

func (c *BlobSizeCache) Lookup(id restic.ID) (size uint, found bool)

Lookup returns the size of the blob id.

type Config

type Config struct {
	OwnerIsRoot      bool
	Hosts            []string
	Tags             []restic.TagList
	Paths            []string
	SnapshotTemplate string
}

Config holds settings for the fuse mount.

type HostsDir added in v0.8.0

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

HostsDir is a fuse directory which contains hosts.

func NewHostsDir

func NewHostsDir(root *Root, inode uint64) *HostsDir

NewHostsDir returns a new directory containing host names

func (*HostsDir) Attr added in v0.8.0

func (d *HostsDir) Attr(ctx context.Context, attr *fuse.Attr) error

Attr returns the attributes for the HostsDir.

func (*HostsDir) Lookup added in v0.8.0

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

Lookup returns a specific entry from the HostsDir.

func (*HostsDir) ReadDirAll added in v0.8.0

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

ReadDirAll returns all entries of the HostsDir.

type MetaDir

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

MetaDir is a fuse directory which contains other directories.

func NewMetaDir

func NewMetaDir(root *Root, inode uint64, entries map[string]fs.Node) *MetaDir

NewMetaDir returns a new meta dir.

func (*MetaDir) Attr

func (d *MetaDir) Attr(ctx context.Context, attr *fuse.Attr) error

Attr returns the attributes for the root node.

func (*MetaDir) Lookup

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

Lookup returns a specific entry from the root node.

func (*MetaDir) ReadDirAll

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

ReadDirAll returns all entries of the root node.

type Root

type Root struct {
	*MetaDir
	// contains filtered or unexported fields
}

Root is the root node of the fuse mount of a repository.

func NewRoot

func NewRoot(ctx context.Context, repo restic.Repository, cfg Config) *Root

NewRoot initializes a new root node from a repository.

func (*Root) Root

func (r *Root) Root() (fs.Node, error)

Root is just there to satisfy fs.Root, it returns itself.

type SnapshotsDir

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

SnapshotsDir is a fuse directory which contains snapshots named by timestamp.

func NewSnapshotsDir

func NewSnapshotsDir(root *Root, inode uint64, tag string, host string) *SnapshotsDir

NewSnapshotsDir returns a new directory containing snapshots.

func (*SnapshotsDir) Attr

func (d *SnapshotsDir) Attr(ctx context.Context, attr *fuse.Attr) error

Attr returns the attributes for the root node.

func (*SnapshotsDir) Lookup

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

Lookup returns a specific entry from the SnapshotsDir.

func (*SnapshotsDir) ReadDirAll

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

ReadDirAll returns all entries of the SnapshotsDir.

type SnapshotsIDSDir added in v0.8.0

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

SnapshotsIDSDir is a fuse directory which contains snapshots named by ids.

func NewSnapshotsIDSDir added in v0.8.0

func NewSnapshotsIDSDir(root *Root, inode uint64) *SnapshotsIDSDir

NewSnapshotsIDSDir returns a new directory containing snapshots named by ids.

func (*SnapshotsIDSDir) Attr added in v0.8.0

func (d *SnapshotsIDSDir) Attr(ctx context.Context, attr *fuse.Attr) error

Attr returns the attributes for the SnapshotsDir.

func (*SnapshotsIDSDir) Lookup added in v0.8.0

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

Lookup returns a specific entry from the SnapshotsIDSDir.

func (*SnapshotsIDSDir) ReadDirAll added in v0.8.0

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

ReadDirAll returns all entries of the SnapshotsIDSDir.

type TagsDir added in v0.8.0

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

TagsDir is a fuse directory which contains tags.

func NewTagsDir

func NewTagsDir(root *Root, inode uint64) *TagsDir

NewTagsDir returns a new directory containing tag names

func (*TagsDir) Attr added in v0.8.0

func (d *TagsDir) Attr(ctx context.Context, attr *fuse.Attr) error

Attr returns the attributes for the TagsDir.

func (*TagsDir) Lookup added in v0.8.0

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

Lookup returns a specific entry from the TagsDir.

func (*TagsDir) ReadDirAll added in v0.8.0

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

ReadDirAll returns all entries of the TagsDir.

Jump to

Keyboard shortcuts

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