fsapi

package
v0.1.23-oss Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XattrDebug       = "debug"
	XattrDiags       = "diags"
	XattrType        = "type"
	XattrFsStatus    = "fs_status"
	XattrHash        = "hash"
	XattrHashSize    = "hash_size"
	XattrHashStat    = "hash_stat"
	XattrDirListHash = "dir_list_hash"
	XattrDeepTree    = "deeptree"
	XattrLoaded      = "loaded"
	XattrDirty       = "dirty"
	XattrExclude     = "exclude"
	XattrCtrl        = "ctrl"
)

Handle all xattr interfaces here, in the future these could be seperated out with registered handlers

Variables

This section is empty.

Functions

func NewCASAPI

func NewCASAPI(fs FS) casfuse.API

Types

type CASApi

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

func (*CASApi) CreateControl

func (*CASApi) CreateControl(ctx context.Context, inode casfuse.Inode, directory string) error

func (*CASApi) CreateGit

func (c *CASApi) CreateGit(ctx context.Context, inode casfuse.Inode, directory, head string) error

func (*CASApi) CreateGitObjects

func (*CASApi) CreateGitObjects(ctx context.Context, inode casfuse.Inode, directory string) error

func (*CASApi) CreateRamfs

func (*CASApi) CreateRamfs(ctx context.Context, inode casfuse.Inode, directory string) error

func (*CASApi) Debug

func (*CASApi) Debug(inode casfuse.Inode) (bool, error)

func (*CASApi) DirList

func (*CASApi) DirList(ctx context.Context, inode casfuse.Inode) (hash.Hash, error)

func (*CASApi) Dirty

func (*CASApi) Dirty(inode casfuse.Inode) (bool, error)

func (*CASApi) Excluded

func (*CASApi) Excluded(inode casfuse.Inode) (bool, error)

func (*CASApi) Hash

func (*CASApi) Hash(ctx context.Context, inode casfuse.Inode) (hash.Hash, error)

func (*CASApi) HashSize

func (*CASApi) HashSize(ctx context.Context, inode casfuse.Inode) (hash.Hash, int64, error)

func (*CASApi) HashStat

func (*CASApi) HashStat(ctx context.Context, inode casfuse.Inode) (*fs.HashStat, error)

func (*CASApi) Loaded

func (*CASApi) Loaded(inode casfuse.Inode) (bool, error)

func (*CASApi) SetDebug

func (*CASApi) SetDebug(inode casfuse.Inode, val bool) error

func (*CASApi) SetDeepTree

func (*CASApi) SetDeepTree(inode casfuse.Inode, hash hash.Hash) error

func (*CASApi) SetExcluded

func (*CASApi) SetExcluded(inode casfuse.Inode, val bool) error

func (*CASApi) SetHash

func (*CASApi) SetHash(inode casfuse.Inode, hash hash.Hash) error

func (*CASApi) SetHashSize

func (*CASApi) SetHashSize(inode casfuse.Inode, hash hash.Hash, size int64) error

func (*CASApi) Status

func (c *CASApi) Status() (*fs.Status, error)

func (*CASApi) Type

func (*CASApi) Type(inode casfuse.Inode) cas.FileMode

type DirNode

type DirNode interface {
	Node

	ForceLoadAll(ctx context.Context) error
	SnapshotDirList(ctx context.Context) (hash.Hash, error)
	SetDeepTree(hash.Hash) error
	AddChild(name string, inode casfuse.Inode)
}

type FS

type FS interface {
	Ready() bool
	Hasher() hash.Hasher
}

type Node

type Node interface {
	IsDebug() bool
	SetDebug(val bool)
	IsDirty() bool
	IsLoaded() bool
	IsExcluded() bool

	SetExcluded(bool)
	Snapshot(ctx context.Context) (hash.Hash, int64, error)
	ForceHashAndSize(hash.Hash, int64) error
}

type Xattr

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

func NewXattr

func NewXattr(api casfuse.API, hasher hash.Hasher) *Xattr

func (*Xattr) GetXattr

func (x *Xattr) GetXattr(ctx context.Context, inode casfuse.Inode, fullname string) (string, error)

func (*Xattr) SetXattr

func (x *Xattr) SetXattr(ctx context.Context, inode casfuse.Inode, fullname, value string) error

Directories

Path Synopsis
git
tap

Jump to

Keyboard shortcuts

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