Documentation ¶
Index ¶
- Constants
- type Blockstore
- 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) Get(cid cid.Cid) (blocks.Block, error)
- func (b *Blockstore) GetSize(cid cid.Cid) (int, error)
- func (b *Blockstore) Has(cid cid.Cid) (bool, error)
- func (b *Blockstore) HashOnRead(_ bool)
- func (b *Blockstore) Put(block blocks.Block) error
- func (b *Blockstore) PutMany(blocks []blocks.Block) error
- func (b *Blockstore) View(cid cid.Cid, callback func([]byte) error) error
Constants ¶
View Source
const ( MaxDBs = 1 // needs to be configurable. MapSize = 1 << 38 // 256GiB, this will need to be configurable. MaxReaders = 128 FreelistReuse = uint(1000) // pages, in case we decide to use https://github.com/ledgerwatch/lmdb-go (non-viral license). )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blockstore ¶
type Blockstore struct {
// contains filtered or unexported fields
}
func Open ¶
func Open(path string) (*Blockstore, error)
func (*Blockstore) AllKeysChan ¶
func (b *Blockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error)
func (*Blockstore) Close ¶
func (b *Blockstore) Close() error
func (*Blockstore) DeleteBlock ¶
func (b *Blockstore) DeleteBlock(cid cid.Cid) error
func (*Blockstore) GetSize ¶
func (b *Blockstore) GetSize(cid cid.Cid) (int, error)
func (*Blockstore) Has ¶
func (b *Blockstore) Has(cid cid.Cid) (bool, error)
func (*Blockstore) HashOnRead ¶
func (b *Blockstore) HashOnRead(_ bool)
Click to show internal directories.
Click to hide internal directories.