sqlite3bs

package module
v0.0.0-...-54df436 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

README

go-bs-sqlite3

optimized sqlite3-backed IPFS blockstore

Documentation

Index

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) Get

func (b *Blockstore) Get(cid cid.Cid) (blocks.Block, 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)

func (*Blockstore) Put

func (b *Blockstore) Put(block blocks.Block) error

func (*Blockstore) PutMany

func (b *Blockstore) PutMany(blocks []blocks.Block) error

type Options

type Options struct {
}

Jump to

Keyboard shortcuts

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