consensusvol

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTID

func NewTID(sch blobcache.SchemaSpec) blobcache.TID

NewTID returns a TID from a SchemaSpec

Types

type Env

type Env struct {
	Background context.Context
	// Hub is used to subscribe to events
	Hub  *pubsub.Hub
	Send func(blobcache.Message) error
}

type Params

type Params struct {
	Schema blobcache.SchemaSpec
	State  volumes.Volume
}

type System

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

func New

func New(env Env) System

func (*System) Drop

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

func (*System) Up

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

type Volume

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

Volume manages state for a volume.

func (*Volume) AccessSubVolume

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

func (*Volume) Await

func (v *Volume) Await(ctx context.Context, prev []byte, next *[]byte) error

Await implements volumes.Volume.

func (*Volume) BeginTx

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

BeginTx implements volumes.Volume.

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(out *[]blobcache.Message, msg blobcache.Message) error

Jump to

Keyboard shortcuts

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