cachebs

package
v0.5.10 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBufferedBstore

func NewBufferedBstore(base bstore.Blockstore, size int) bstore.Blockstore

Types

type CacheBS

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

func (*CacheBS) AllKeysChan

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

func (*CacheBS) DeleteBlock

func (bs *CacheBS) DeleteBlock(c cid.Cid) error

func (*CacheBS) Get

func (bs *CacheBS) Get(c cid.Cid) (block.Block, error)

func (*CacheBS) GetSize

func (bs *CacheBS) GetSize(c cid.Cid) (int, error)

func (*CacheBS) Has

func (bs *CacheBS) Has(c cid.Cid) (bool, error)

func (*CacheBS) HashOnRead

func (bs *CacheBS) HashOnRead(hor bool)

func (*CacheBS) Put

func (bs *CacheBS) Put(blk block.Block) error

func (*CacheBS) PutMany

func (bs *CacheBS) PutMany(blks []block.Block) error

Jump to

Keyboard shortcuts

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