fuse

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2017 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHostsDir

func NewHostsDir(root *Root, inode uint64, snapshots restic.Snapshots) fs.Node

NewHostsDir returns a new directory containing hostnames, which in turn contains snapshots of a single host each.

func NewTagsDir

func NewTagsDir(root *Root, inode uint64, snapshots restic.Snapshots) fs.Node

NewTagsDir returns a new directory containing entries, which in turn contains snapshots with this tag set.

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
	Host        string
	Tags        []restic.TagList
	Paths       []string
}

Config holds settings for the fuse mount.

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, error)

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.

func NewSnapshotsDir

func NewSnapshotsDir(root *Root, inode uint64, snapshots restic.Snapshots) *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 root node.

func (*SnapshotsDir) ReadDirAll

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

ReadDirAll returns all entries of the root node.

Jump to

Keyboard shortcuts

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