Versions in this module Expand all Collapse all v1 v1.0.6 Jun 2, 2022 Changes in this version + var DefaultInitialMmapSize = int64(1 << 30) + var DefaultMaxReaders = 254 + var DefaultMmapGrowthStepFactor = 1.5 + var DefaultMmapGrowthStepMax = int64(4 << 30) + var DefaultRetryDelay = 10 * time.Millisecond + var RetryJitter = 0.2 + type Blockstore struct + func Open(opts *Options) (*Blockstore, error) + func (b *Blockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) + func (b *Blockstore) Close() error + func (b *Blockstore) DeleteBlock(cid cid.Cid) error + func (b *Blockstore) DeleteMany(cids []cid.Cid) error + func (b *Blockstore) Get(key cid.Cid) (blocks.Block, error) + func (b *Blockstore) GetEnv() *lmdb.Env + func (b *Blockstore) GetSize(cid cid.Cid) (int, error) + func (b *Blockstore) Has(cid cid.Cid) (bool, error) + func (b *Blockstore) HashOnRead(enabled bool) + func (b *Blockstore) Put(block blocks.Block) error + func (b *Blockstore) PutMany(blocks []blocks.Block) error + func (b *Blockstore) Stat() (*lmdb.Stat, error) + func (b *Blockstore) View(cid cid.Cid, callback func([]byte) error) error + type Options struct + InitialMmapSize int64 + MaxDBs int + MaxReaders int + MmapGrowthStepFactor float64 + MmapGrowthStepMax int64 + NoLock bool + NoSync bool + Path string + ReadOnly bool + RetryDelay time.Duration + type WithLmdbEnv interface + GetEnv func() *lmdb.Env