remotevol

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type System

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

func New

func New(node *atomic.Pointer[bcnet.Node]) System

func (*System) Drop

func (sys *System) Drop(ctx context.Context, vol *Volume) error

func (*System) OpenFrom

func (sys *System) OpenFrom(ctx context.Context, base *Volume, target blobcache.OID, mask blobcache.ActionSet) (blobcache.ActionSet, *Volume, error)

func (*System) Up

func (sys *System) Up(ctx context.Context, p Params) (*Volume, error)

type Tx

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

Tx is a transaction on a remote volume.

func (*Tx) Abort

func (tx *Tx) Abort(ctx context.Context) error

func (*Tx) Commit

func (tx *Tx) Commit(ctx context.Context) error

func (*Tx) Delete

func (tx *Tx) Delete(ctx context.Context, cids []blobcache.CID) error

func (*Tx) Exists

func (tx *Tx) Exists(ctx context.Context, cids []blobcache.CID, dst []bool) error

func (*Tx) Get

func (tx *Tx) Get(ctx context.Context, cid blobcache.CID, buf []byte, opts blobcache.GetOpts) (int, error)

func (*Tx) Hash

func (tx *Tx) Hash(salt *blobcache.CID, data []byte) blobcache.CID

func (*Tx) IsVisited

func (tx *Tx) IsVisited(ctx context.Context, cids []blobcache.CID, dst []bool) error
func (tx *Tx) Link(ctx context.Context, target blobcache.OID, mask blobcache.ActionSet, targetVol volumes.Volume) error

func (*Tx) Load

func (tx *Tx) Load(ctx context.Context, dst *[]byte) error

func (*Tx) MaxSize

func (tx *Tx) MaxSize() int

func (*Tx) Params added in v0.0.2

func (tx *Tx) Params() blobcache.TxParams

func (*Tx) Post

func (tx *Tx) Post(ctx context.Context, data []byte, opts blobcache.PostOpts) (blobcache.CID, error)

func (*Tx) Save

func (tx *Tx) Save(ctx context.Context, src []byte) error
func (tx *Tx) Unlink(ctx context.Context, targets []blobcache.OID) error

func (*Tx) Visit

func (tx *Tx) Visit(ctx context.Context, cids []blobcache.CID) error
func (tx *Tx) VisitLinks(ctx context.Context, targets []blobcache.OID) error

func (*Tx) Volume

func (tx *Tx) Volume() volumes.Volume

type Volume

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

Volume is a remote volume.

func NewVolume

func NewVolume(sys *System, node bcp.Asker, ep blobcache.Endpoint, h blobcache.Handle, info *blobcache.VolumeInfo) *Volume

func (*Volume) AccessSubVolume

func (v *Volume) AccessSubVolume(ctx context.Context, target blobcache.OID) (blobcache.ActionSet, error)

func (*Volume) BeginTx

func (v *Volume) BeginTx(ctx context.Context, spec blobcache.TxParams) (volumes.Tx, error)

func (*Volume) Endpoint

func (v *Volume) Endpoint() blobcache.Endpoint

func (*Volume) GetBackend

func (v *Volume) GetBackend() blobcache.VolumeBackend[blobcache.OID]

func (*Volume) GetParams

func (v *Volume) GetParams() blobcache.VolumeConfig

func (*Volume) Handle

func (v *Volume) Handle() blobcache.Handle

Jump to

Keyboard shortcuts

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