memory

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

Documentation

Index

Constants

View Source
const (
	MaxMaxDepth      = 16
	MaxMaxHandlesPer = 16
	MaxMaxBytesPer   = 1 << 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

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

func (*Queue) Backend added in v0.8.0

func (q *Queue) Backend() blobcache.QueueBackend[blobcache.OID]

func (*Queue) Config

func (q *Queue) Config() blobcache.QueueConfig

func (*Queue) Dequeue

func (q *Queue) Dequeue(ctx context.Context, buf []blobcache.Message, opts blobcache.DequeueOpts) (int, error)

func (*Queue) Down added in v0.8.0

func (q *Queue) Down(ctx context.Context) error

func (*Queue) Enqueue

func (q *Queue) Enqueue(ctx context.Context, msgs []blobcache.Message) (int, error)

type System

type System struct {
}

func (*System) CreateQueue

func (sys *System) CreateQueue(ctx context.Context, spec blobcache.QueueBackend_Memory) (*Queue, error)

func (*System) QueueDown

func (sys *System) QueueDown(ctx context.Context, q *Queue) error

type Tx added in v0.8.0

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

func (*Tx) Abort added in v0.8.0

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

func (*Tx) Commit added in v0.8.0

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

func (*Tx) Delete added in v0.8.0

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

func (*Tx) Exists added in v0.8.0

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

func (*Tx) Get added in v0.8.0

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

func (*Tx) HashAlgo added in v0.8.0

func (tx *Tx) HashAlgo() blobcache.HashAlgo

func (*Tx) IsVisited added in v0.8.0

func (tx *Tx) IsVisited(_ context.Context, cids []blobcache.CID, dst *blobcache.BitMap) error
func (tx *Tx) Link(ctx context.Context, svoid blobcache.OID, rights blobcache.ActionSet, child bccore.AnyObject) (*blobcache.LinkToken, error)

func (*Tx) Load added in v0.8.0

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

func (*Tx) MaxSize added in v0.8.0

func (tx *Tx) MaxSize() int

func (*Tx) Params added in v0.8.0

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

func (*Tx) Post added in v0.8.0

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

func (*Tx) Save added in v0.8.0

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

func (*Tx) Visit added in v0.8.0

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

type Volume added in v0.8.0

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

func NewVolume added in v0.8.0

func NewVolume(maxBytes uint64) *Volume

func (*Volume) AccessSubVolume added in v0.8.0

func (vol *Volume) AccessSubVolume(ctx context.Context, target blobcache.LinkToken) (blobcache.ActionSet, error)

func (*Volume) BeginTx added in v0.8.0

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

func (*Volume) Down added in v0.8.0

func (vol *Volume) Down(ctx context.Context) error

func (*Volume) GetBackend added in v0.8.0

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

func (*Volume) GetParams added in v0.8.0

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

func (*Volume) Load added in v0.8.0

func (vol *Volume) Load(ctx context.Context, dst *[]byte) error

Jump to

Keyboard shortcuts

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