Documentation ¶
Index ¶
- func NewBlockstore(dstore datastore.Batching, url string) (blockstore.Blockstore, error)
- type Blockstore
- func (b *Blockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error)
- func (b *Blockstore) DeleteBlock(ctx context.Context, id cid.Cid) error
- func (b *Blockstore) Get(ctx context.Context, id cid.Cid) (blocks.Block, error)
- func (b *Blockstore) GetSize(ctx context.Context, id cid.Cid) (int, error)
- func (b *Blockstore) Has(ctx context.Context, id cid.Cid) (bool, error)
- func (b *Blockstore) HashOnRead(enabled bool)
- func (b *Blockstore) Put(ctx context.Context, blk blocks.Block) error
- func (b *Blockstore) PutMany(ctx context.Context, blks []blocks.Block) error
- type Bridge
- func (b *Bridge) PutBlock(ctx context.Context, block *types.Block) error
- func (b *Bridge) PutHeader(ctx context.Context, header *types.Header) error
- func (b *Bridge) PutHeaderList(ctx context.Context, list []*types.Header) error
- func (b *Bridge) PutTransactions(ctx context.Context, txs types.Transactions) (common.Hash, error)
- func (b *Bridge) Sync(ctx context.Context, id cid.Cid) error
- type Node
- func (n *Node) GetBlockByHash(ctx context.Context, hash common.Hash) (*types.Block, error)
- func (n *Node) GetHeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
- func (n *Node) GetHeaderList(ctx context.Context, hash common.Hash) ([]*types.Header, error)
- func (n *Node) GetReceipts(ctx context.Context, hash common.Hash) (types.Receipts, error)
- func (n *Node) GetTransactions(ctx context.Context, hash common.Hash) (types.Transactions, error)
- func (n *Node) PeerId() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBlockstore ¶
func NewBlockstore(dstore datastore.Batching, url string) (blockstore.Blockstore, error)
Types ¶
type Blockstore ¶
type Blockstore struct {
// contains filtered or unexported fields
}
func (*Blockstore) AllKeysChan ¶
AllKeysChan returns a channel from which the CIDs in the Blockstore can be read. It should respect the given context, closing the channel if it becomes Done.
func (*Blockstore) DeleteBlock ¶
func (*Blockstore) HashOnRead ¶
func (b *Blockstore) HashOnRead(enabled bool)
HashOnRead specifies if every read block should be rehashed to make sure it matches its CID.
type Bridge ¶
type Bridge struct {
// contains filtered or unexported fields
}
func NewBridge ¶
func NewBridge(bstore blockstore.Blockstore, url string) (*Bridge, error)
func (*Bridge) PutHeaderList ¶
func (*Bridge) PutTransactions ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) GetBlockByHash ¶
func (*Node) GetHeaderByHash ¶
func (*Node) GetHeaderList ¶
func (*Node) GetReceipts ¶
func (*Node) GetTransactions ¶
Click to show internal directories.
Click to hide internal directories.