Documentation ¶
Index ¶
- Constants
- Variables
- func NewIndexBackedBlockstore(ctx context.Context, d IdxBstoreDagstore, shardSelector ShardSelectorF, ...) (blockstore.Blockstore, error)
- type BlockstoreOp
- type IdxBstoreDagstore
- type IdxBstoreDagstoreFromDagstore
- type IndexBackedBlockstore
- func (ro *IndexBackedBlockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error)
- func (ro *IndexBackedBlockstore) DeleteBlock(context.Context, cid.Cid) error
- func (ro *IndexBackedBlockstore) Get(ctx context.Context, c cid.Cid) (blocks.Block, error)
- func (ro *IndexBackedBlockstore) GetSize(ctx context.Context, c cid.Cid) (int, error)
- func (ro *IndexBackedBlockstore) Has(ctx context.Context, c cid.Cid) (bool, error)
- func (ro *IndexBackedBlockstore) HashOnRead(_ bool)
- func (ro *IndexBackedBlockstore) Put(context.Context, blocks.Block) error
- func (ro *IndexBackedBlockstore) PutMany(context.Context, []blocks.Block) error
- type ShardSelectorF
Constants ¶
View Source
const ( BlockstoreOpGet = true BlockstoreOpGetSize = !BlockstoreOpGet )
Variables ¶
View Source
var ErrBlockNotFound = errors.New("block not found")
View Source
var ErrNoShardSelected = errors.New("no shard selected")
ErrNoShardSelected means that the shard selection function rejected all of the given shards.
Functions ¶
func NewIndexBackedBlockstore ¶
func NewIndexBackedBlockstore(ctx context.Context, d IdxBstoreDagstore, shardSelector ShardSelectorF, maxCacheSize int, cacheExpire time.Duration) (blockstore.Blockstore, error)
Types ¶
type BlockstoreOp ¶
type BlockstoreOp bool
func (BlockstoreOp) String ¶
func (o BlockstoreOp) String() string
type IdxBstoreDagstore ¶ added in v0.7.0
type IdxBstoreDagstoreFromDagstore ¶ added in v0.7.0
func (*IdxBstoreDagstoreFromDagstore) ShardsContainingCid ¶ added in v0.7.0
type IndexBackedBlockstore ¶
type IndexBackedBlockstore struct {
// contains filtered or unexported fields
}
IndexBackedBlockstore is a read only blockstore over all cids across all shards in the dagstore.
func (*IndexBackedBlockstore) AllKeysChan ¶
func (ro *IndexBackedBlockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error)
func (*IndexBackedBlockstore) DeleteBlock ¶
func (ro *IndexBackedBlockstore) DeleteBlock(context.Context, cid.Cid) error
--- UNSUPPORTED BLOCKSTORE METHODS -------
func (*IndexBackedBlockstore) GetSize ¶
func (ro *IndexBackedBlockstore) GetSize(ctx context.Context, c cid.Cid) (int, error)
func (*IndexBackedBlockstore) Has ¶
func (ro *IndexBackedBlockstore) Has(ctx context.Context, c cid.Cid) (bool, error)
func (*IndexBackedBlockstore) HashOnRead ¶
func (ro *IndexBackedBlockstore) HashOnRead(_ bool)
Click to show internal directories.
Click to hide internal directories.