Documentation ¶
Index ¶
- type BlockRefStore
- func (s *BlockRefStore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error)
- func (s *BlockRefStore) DeleteBlock(ctx context.Context, id cid.Cid) error
- func (s *BlockRefStore) Get(ctx context.Context, id cid.Cid) (blocks.Block, error)
- func (s *BlockRefStore) GetSize(ctx context.Context, id cid.Cid) (int, error)
- func (s *BlockRefStore) Has(ctx context.Context, id cid.Cid) (bool, error)
- func (s *BlockRefStore) HashOnRead(enabled bool)
- func (s *BlockRefStore) Put(ctx context.Context, blk blocks.Block) error
- func (s *BlockRefStore) PutMany(ctx context.Context, blks []blocks.Block) error
- func (s *BlockRefStore) PutRef(ctx context.Context, blk blocks.Block, path string, offset uint64, ...) error
- func (s *BlockRefStore) Shutdown(ctx context.Context) error
- type Opts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockRefStore ¶
type BlockRefStore struct {
// contains filtered or unexported fields
}
BlockRefStore is a wrapper over datastore that stores block reference. It implements block store interface.
func NewBlockRefStore ¶
func NewBlockRefStore(ctx context.Context, opts Opts) (*BlockRefStore, error)
NewBlockRefStore creates a new block reference store.
@input - context, options.
@output - block reference store, error.
func (*BlockRefStore) AllKeysChan ¶
func (s *BlockRefStore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error)
AllKeysChan implements blockstore.Blockstore interface.
func (*BlockRefStore) DeleteBlock ¶
func (s *BlockRefStore) DeleteBlock(ctx context.Context, id cid.Cid) error
DeleteBlock implements a blockstore.Blockstore interface.
func (*BlockRefStore) GetSize ¶
func (s *BlockRefStore) GetSize(ctx context.Context, id cid.Cid) (int, error)
GetSize implements blockstore.Blockstore interface.
func (*BlockRefStore) Has ¶
func (s *BlockRefStore) Has(ctx context.Context, id cid.Cid) (bool, error)
Has implements blockstore.Blockstore interface.
func (*BlockRefStore) HashOnRead ¶
func (s *BlockRefStore) HashOnRead(enabled bool)
HashOnRead implements blockstore.Blockstore interface.
Click to show internal directories.
Click to hide internal directories.