Documentation ¶
Index ¶
- 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
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blockstore ¶
type Blockstore struct {
// contains filtered or unexported fields
}
Blockstore is a sqlite backed IPLD blockstore, highly optimized and customized for IPLD query and write patterns.
func Open ¶
func Open(path string, _ Options) (*Blockstore, error)
Open creates a new sqlite3-backed blockstore.
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.