backend

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinkSet

type LinkSet = map[[32]byte]blobcache.OID

type Queue

type Queue = bccore.Queue

type QueueSystem

type QueueSystem[Spec any, Q Queue] interface {
	// CreateQueue creates a new queue from the spec and returns it.
	CreateQueue(ctx context.Context, spec Spec) (Q, error)
}

type System

type System[VP any, V Volume, QP any, Q Queue] interface {
	VolumeSystem[VP, V]
	QueueSystem[QP, Q]
}

System is a full backend System, supporting Volumes, Queues and subscriptions on Volumes.

type Tx

type Tx = bccore.Tx

type UnsaltedStore

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

This is an adapter to a store, since we added salts to the API.

func NewUnsaltedStore

func NewUnsaltedStore(inner Tx) *UnsaltedStore

func ViewUnsalted

func ViewUnsalted(ctx context.Context, tx Tx) (*UnsaltedStore, []byte, error)

func (UnsaltedStore) Delete

func (v UnsaltedStore) Delete(ctx context.Context, cids []blobcache.CID) error

func (UnsaltedStore) Exists

func (v UnsaltedStore) Exists(ctx context.Context, cids []blobcache.CID, dst *blobcache.BitMap) error

func (UnsaltedStore) Get

func (v UnsaltedStore) Get(ctx context.Context, cid blobcache.CID, buf []byte) (int, error)

func (UnsaltedStore) Hash

func (v UnsaltedStore) Hash(data []byte) blobcache.CID

func (UnsaltedStore) HashAlgo added in v0.6.0

func (v UnsaltedStore) HashAlgo() blobcache.HashAlgo

func (UnsaltedStore) MaxSize

func (v UnsaltedStore) MaxSize() int

func (UnsaltedStore) Post

func (v UnsaltedStore) Post(ctx context.Context, data []byte) (blobcache.CID, error)

type Volume

type Volume = bccore.Volume

type VolumeSystem

type VolumeSystem[Params any, V Volume] interface {
	// VolumeUp loads volume state into memory.
	// This should be called to begin using the Volume.
	VolumeUp(ctx context.Context, spec Params) (V, error)

	// VolumeDestroy should remove all state associated with the volume
	VolumeDestroy(ctx context.Context, vol V) error
}

Directories

Path Synopsis
Package gitvol implements a Volume in terms of Git
Package gitvol implements a Volume in terms of Git

Jump to

Keyboard shortcuts

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