Documentation ¶
Index ¶
- type BlockstoreAPI
- func (blockstoreAPI *BlockstoreAPI) ChainDeleteObj(ctx context.Context, obj cid.Cid) error
- func (blockstoreAPI *BlockstoreAPI) ChainHasObj(ctx context.Context, obj cid.Cid) (bool, error)
- func (blockstoreAPI *BlockstoreAPI) ChainReadObj(ctx context.Context, ocid cid.Cid) ([]byte, error)
- func (blockstoreAPI *BlockstoreAPI) ChainStatObj(ctx context.Context, obj cid.Cid, base cid.Cid) (ObjStat, error)
- type BlockstoreSubmodule
- type IBlockstoreAPI
- type ObjStat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockstoreAPI ¶
type BlockstoreAPI struct {
// contains filtered or unexported fields
}
func (*BlockstoreAPI) ChainDeleteObj ¶ added in v0.9.1
func (blockstoreAPI *BlockstoreAPI) ChainDeleteObj(ctx context.Context, obj cid.Cid) error
func (*BlockstoreAPI) ChainHasObj ¶ added in v0.9.1
func (blockstoreAPI *BlockstoreAPI) ChainHasObj(ctx context.Context, obj cid.Cid) (bool, error)
func (*BlockstoreAPI) ChainReadObj ¶ added in v0.9.1
func (blockstoreAPI *BlockstoreAPI) ChainReadObj(ctx context.Context, ocid cid.Cid) ([]byte, error)
func (*BlockstoreAPI) ChainStatObj ¶ added in v0.9.1
func (blockstoreAPI *BlockstoreAPI) ChainStatObj(ctx context.Context, obj cid.Cid, base cid.Cid) (ObjStat, error)
type BlockstoreSubmodule ¶
type BlockstoreSubmodule struct { // blockstore is the un-networked blocks interface Blockstore bstore.Blockstore // cborStore is a wrapper for a `cbor.IpldStore` that works on the local IPLD-Cbor objects stored in `blockstore`. CborStore cbor.IpldStore }
BlockstoreSubmodule enhances the `Node` with local key/value storing capabilities.
TODO: split chain data from piece data (issue: https://github.com/filecoin-project/venus/issues/3481) Note: at present: - `blockstore` is shared by chain/graphsync and piece/bitswap data - `cborStore` is used for chain state and shared with piece data exchange for deals at the moment.
func NewBlockstoreSubmodule ¶
func NewBlockstoreSubmodule(ctx context.Context, repo blockstoreRepo) (*BlockstoreSubmodule, error)
NewBlockstoreSubmodule creates a new block store submodule.
func (*BlockstoreSubmodule) API ¶
func (bsm *BlockstoreSubmodule) API() *BlockstoreAPI
type IBlockstoreAPI ¶ added in v0.9.1
Click to show internal directories.
Click to hide internal directories.