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 ¶
- Variables
- type RamBs
- func (rbs *RamBs) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error)
- func (rbs *RamBs) Close() error
- func (rbs *RamBs) DeleteBlock(c cid.Cid) error
- func (rbs *RamBs) Get(c cid.Cid) (blocks.Block, error)
- func (rbs *RamBs) GetSize(c cid.Cid) (int, error)
- func (rbs *RamBs) Has(c cid.Cid) (bool, error)
- func (rbs *RamBs) HashOnRead(bool)
- func (rbs *RamBs) Put(b blocks.Block) error
- func (rbs *RamBs) PutMany(blks []blocks.Block) error
- func (rbs *RamBs) View(c cid.Cid, cb func([]byte) error) error
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 (*RamBs) DeleteBlock ¶
func (*RamBs) HashOnRead ¶
Click to show internal directories.
Click to hide internal directories.