ribsbstore

package
v0.0.0-...-1d79cfa Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BlockstoreMaxQueuedBlocks    = 640
	BlockstoreMaxUnflushedBlocks = 10240
)

Functions

This section is empty.

Types

type Blockstore

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

func New

func New(ctx context.Context, r ribs.RIBS) *Blockstore

func (*Blockstore) AllKeysChan

func (b *Blockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error)

func (*Blockstore) Close

func (b *Blockstore) Close() error

func (*Blockstore) DeleteBlock

func (b *Blockstore) DeleteBlock(ctx context.Context, c cid.Cid) error

func (*Blockstore) Flush

func (b *Blockstore) Flush(ctx context.Context) error

func (*Blockstore) Get

func (b *Blockstore) Get(ctx context.Context, c cid.Cid) (blocks.Block, error)

func (*Blockstore) GetSize

func (b *Blockstore) GetSize(ctx context.Context, c cid.Cid) (int, error)

func (*Blockstore) Has

func (b *Blockstore) Has(ctx context.Context, c cid.Cid) (bool, error)

func (*Blockstore) HashOnRead

func (b *Blockstore) HashOnRead(bool)

func (*Blockstore) Put

func (b *Blockstore) Put(ctx context.Context, block blocks.Block) error

func (*Blockstore) PutMany

func (b *Blockstore) PutMany(ctx context.Context, blk []blocks.Block) error

type Request

type Request[P, R any] struct {
	Param P
	Resp  chan R
}

func MakeRequest

func MakeRequest[P, R any](param P) Request[P, R]

Jump to

Keyboard shortcuts

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