glfs

package
v0.0.0-...-575026b Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiffRefs

func DiffRefs(ctx context.Context, src cadata.Getter, left, right glfs.Ref, fn func(left, right *glfs.Ref) error) error

DiffRefs calls fn for ecah ref that is only in the left filsystem or only in the right filesystem. Each call to fn, will only set one of left or right to non-nil.

func Load

func Load(ctx context.Context, txn *blobcache.Tx) (*glfs.Ref, error)

func MarshalRef

func MarshalRef(ref *glfs.Ref) []byte

func ParseRef

func ParseRef(root []byte) (*glfs.Ref, error)

func SyncTx

func SyncTx(ctx context.Context, srcTx, dstTx *blobcache.Tx) error

SyncTx efficiently copies all the data from src to dst. SyncTx will call Commit on dstTx with the new root.

func SyncVolume

func SyncVolume(ctx context.Context, svc blobcache.Service, srcVol, dstVol blobcache.Handle) error

Types

type Schema

type Schema struct {
	Mach *glfs.Machine
}

func (*Schema) Validate

func (sch *Schema) Validate(ctx context.Context, src schema.RO, prev, next []byte) error

type Store

type Store interface {
	Get(ctx context.Context, cid cadata.ID, buf []byte) (int, error)
	Post(ctx context.Context, salt *cadata.ID, data []byte) (cadata.ID, error)
	Exists(ctx context.Context, cid cadata.ID) (bool, error)
}

Jump to

Keyboard shortcuts

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