Versions in this module Expand all Collapse all v1 v1.0.5 Feb 10, 2021 Changes in this version + var BlockPrefix = ds.NewKey("blocks") + var ErrHashMismatch = errors.New("block in storage has different hash than requested") + var ErrNotFound = errors.New("blockstore: block not found") + type Blockstore interface + AllKeysChan func(ctx context.Context) (<-chan cid.Cid, error) + DeleteBlock func(cid.Cid) error + Get func(cid.Cid) (blocks.Block, error) + GetSize func(cid.Cid) (int, error) + Has func(cid.Cid) (bool, error) + HashOnRead func(enabled bool) + Put func(blocks.Block) error + PutMany func([]blocks.Block) error + func CachedBlockstore(ctx context.Context, bs Blockstore, opts CacheOpts) (cbs Blockstore, err error) + func NewBlockstore(d ds.Batching, blockprefix ...string) Blockstore + func NewIdStore(bs Blockstore) Blockstore + type CacheOpts struct + HasARCCacheSize int + HasBloomFilterHashes int + HasBloomFilterSize int + func DefaultCacheOpts() CacheOpts + type GCBlockstore interface + func NewGCBlockstore(bs Blockstore, gcl GCLocker) GCBlockstore + type GCLocker interface + GCLock func() Unlocker + GCRequested func() bool + PinLock func() Unlocker + func NewGCLocker() GCLocker + type Unlocker interface + Unlock func() + type Viewer interface + View func(cid cid.Cid, callback func([]byte) error) error