Documentation
¶
Index ¶
- type BlockStore
- func (s *BlockStore) GetBlock(ctx context.Context, req *block_rpc.GetBlockRequest) (*block_rpc.GetBlockResponse, error)
- func (s *BlockStore) GetBlockExists(ctx context.Context, req *block_rpc.GetBlockExistsRequest) (*block_rpc.GetBlockExistsResponse, error)
- func (s *BlockStore) GetBlockExistsBatch(ctx context.Context, req *block_rpc.GetBlockExistsBatchRequest) (*block_rpc.GetBlockExistsBatchResponse, error)
- func (s *BlockStore) GetHashType(_ context.Context, _ *block_rpc.GetHashTypeRequest) (*block_rpc.GetHashTypeResponse, error)
- func (s *BlockStore) GetSupportedFeatures(context.Context, *block_rpc.GetSupportedFeaturesRequest) (*block_rpc.GetSupportedFeaturesResponse, error)
- func (s *BlockStore) PutBlock(ctx context.Context, req *block_rpc.PutBlockRequest) (*block_rpc.PutBlockResponse, error)
- func (s *BlockStore) PutBlockBatch(ctx context.Context, req *block_rpc.PutBlockBatchRequest) (*block_rpc.PutBlockBatchResponse, error)
- func (s *BlockStore) RmBlock(ctx context.Context, req *block_rpc.RmBlockRequest) (*block_rpc.RmBlockResponse, error)
- func (s *BlockStore) StatBlock(ctx context.Context, req *block_rpc.StatBlockRequest) (*block_rpc.StatBlockResponse, error)
- func (s *BlockStore) Sync(ctx context.Context, _ *block_rpc.SyncRequest) (*block_rpc.SyncResponse, error)
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 implements the BlockStore RPC service.
func NewBlockStore ¶
func NewBlockStore(store block.StoreOps) *BlockStore
NewBlockStore constructs a new BlockStore from a Store.
func (*BlockStore) GetBlock ¶
func (s *BlockStore) GetBlock( ctx context.Context, req *block_rpc.GetBlockRequest, ) (*block_rpc.GetBlockResponse, error)
GetBlock returns a block from the store.
func (*BlockStore) GetBlockExists ¶
func (s *BlockStore) GetBlockExists( ctx context.Context, req *block_rpc.GetBlockExistsRequest, ) (*block_rpc.GetBlockExistsResponse, error)
GetBlockExists checks if the block exists in the store.
func (*BlockStore) GetBlockExistsBatch ¶
func (s *BlockStore) GetBlockExistsBatch( ctx context.Context, req *block_rpc.GetBlockExistsBatchRequest, ) (*block_rpc.GetBlockExistsBatchResponse, error)
GetBlockExistsBatch checks if blocks exist in the store.
func (*BlockStore) GetHashType ¶
func (s *BlockStore) GetHashType( _ context.Context, _ *block_rpc.GetHashTypeRequest, ) (*block_rpc.GetHashTypeResponse, error)
GetHashType returns the preferred hash type for the store.
func (*BlockStore) GetSupportedFeatures ¶
func (s *BlockStore) GetSupportedFeatures( context.Context, *block_rpc.GetSupportedFeaturesRequest, ) (*block_rpc.GetSupportedFeaturesResponse, error)
GetSupportedFeatures returns the native feature bitmask for the store.
func (*BlockStore) PutBlock ¶
func (s *BlockStore) PutBlock( ctx context.Context, req *block_rpc.PutBlockRequest, ) (*block_rpc.PutBlockResponse, error)
PutBlock stores a block into the store.
func (*BlockStore) PutBlockBatch ¶
func (s *BlockStore) PutBlockBatch( ctx context.Context, req *block_rpc.PutBlockBatchRequest, ) (*block_rpc.PutBlockBatchResponse, error)
PutBlockBatch stores blocks into the store as a batch.
func (*BlockStore) RmBlock ¶
func (s *BlockStore) RmBlock( ctx context.Context, req *block_rpc.RmBlockRequest, ) (*block_rpc.RmBlockResponse, error)
RmBlock removes the block from the store.
func (*BlockStore) StatBlock ¶
func (s *BlockStore) StatBlock( ctx context.Context, req *block_rpc.StatBlockRequest, ) (*block_rpc.StatBlockResponse, error)
StatBlock returns metadata about a block without reading its data.
func (*BlockStore) Sync ¶ added in v0.52.0
func (s *BlockStore) Sync( ctx context.Context, _ *block_rpc.SyncRequest, ) (*block_rpc.SyncResponse, error)
Sync drains buffered writes and blocks until prior writes are durable.