rambs

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2021 License: Apache-2.0, MIT Imports: 7 Imported by: 2

Documentation

Overview

Package rambs is an implementation of a blockstore, keeping records indexed by full CIDs instead of just multihashes. It is the moral equivalent of

blockstore.NewBlockstore(dssync.MutexWrap(ds.NewMapDatastore()))

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = blockstore.ErrNotFound

Functions

This section is empty.

Types

type RamBs

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

func (*RamBs) AllKeysChan

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

func (*RamBs) Close

func (rbs *RamBs) Close() error

func (*RamBs) DeleteBlock

func (rbs *RamBs) DeleteBlock(c cid.Cid) error

func (*RamBs) Get

func (rbs *RamBs) Get(c cid.Cid) (blocks.Block, error)

func (*RamBs) GetSize

func (rbs *RamBs) GetSize(c cid.Cid) (int, error)

func (*RamBs) Has

func (rbs *RamBs) Has(c cid.Cid) (bool, error)

func (*RamBs) HashOnRead

func (rbs *RamBs) HashOnRead(bool)

func (*RamBs) Put

func (rbs *RamBs) Put(b blocks.Block) error

func (*RamBs) PutMany

func (rbs *RamBs) PutMany(blks []blocks.Block) error

func (*RamBs) View

func (rbs *RamBs) View(c cid.Cid, cb func([]byte) error) error

Jump to

Keyboard shortcuts

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