Documentation
¶
Index ¶
- type BlockStore
- func (s *BlockStore) BeginDeferFlush(context.Context, *block_rpc.BeginDeferFlushRequest) (*block_rpc.BeginDeferFlushResponse, error)
- func (s *BlockStore) EndDeferFlush(ctx context.Context, _ *block_rpc.EndDeferFlushRequest) (*block_rpc.EndDeferFlushResponse, error)
- func (s *BlockStore) Flush(ctx context.Context, _ *block_rpc.FlushRequest) (*block_rpc.FlushResponse, error)
- 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) PutBlockBackground(ctx context.Context, req *block_rpc.PutBlockBackgroundRequest) (*block_rpc.PutBlockBackgroundResponse, 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)
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) BeginDeferFlush ¶
func (s *BlockStore) BeginDeferFlush( context.Context, *block_rpc.BeginDeferFlushRequest, ) (*block_rpc.BeginDeferFlushResponse, error)
BeginDeferFlush opens a defer-flush scope.
func (*BlockStore) EndDeferFlush ¶
func (s *BlockStore) EndDeferFlush( ctx context.Context, _ *block_rpc.EndDeferFlushRequest, ) (*block_rpc.EndDeferFlushResponse, error)
EndDeferFlush closes a defer-flush scope.
func (*BlockStore) Flush ¶
func (s *BlockStore) Flush( ctx context.Context, _ *block_rpc.FlushRequest, ) (*block_rpc.FlushResponse, error)
Flush publishes buffered writes when the store supports an explicit flush.
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) PutBlockBackground ¶
func (s *BlockStore) PutBlockBackground( ctx context.Context, req *block_rpc.PutBlockBackgroundRequest, ) (*block_rpc.PutBlockBackgroundResponse, error)
PutBlockBackground stores a block in the background.
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.