Documentation ¶
Index ¶
- Constants
- type BlobNodeClient
- func (c *BlobNodeClient) GetShard(ctx context.Context, location proto.VunitLocation, bid proto.BlobID, ...) (body io.ReadCloser, crc32 uint32, err error)
- func (c *BlobNodeClient) ListShards(ctx context.Context, location proto.VunitLocation) (sis []*ShardInfo, err error)
- func (c *BlobNodeClient) PutShard(ctx context.Context, location proto.VunitLocation, bid proto.BlobID, ...) (err error)
- func (c *BlobNodeClient) StatChunk(ctx context.Context, location proto.VunitLocation) (ci *ChunkInfo, err error)
- func (c *BlobNodeClient) StatShard(ctx context.Context, location proto.VunitLocation, bid proto.BlobID) (si *ShardInfo, err error)
- type ChunkInfo
- type IBlobNode
- type ShardInfo
Constants ¶
View Source
const (
// ShardStatusNotExist shard not exist code
ShardStatusNotExist = 100
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlobNodeClient ¶
type BlobNodeClient struct {
// contains filtered or unexported fields
}
BlobNodeClient blobnode client
func (*BlobNodeClient) GetShard ¶
func (c *BlobNodeClient) GetShard(ctx context.Context, location proto.VunitLocation, bid proto.BlobID, ioType api.IOType) (body io.ReadCloser, crc32 uint32, err error)
GetShard returns shard data
func (*BlobNodeClient) ListShards ¶
func (c *BlobNodeClient) ListShards(ctx context.Context, location proto.VunitLocation) (sis []*ShardInfo, err error)
ListShards return shards info
func (*BlobNodeClient) PutShard ¶
func (c *BlobNodeClient) PutShard(ctx context.Context, location proto.VunitLocation, bid proto.BlobID, size int64, body io.Reader, ioType api.IOType) (err error)
PutShard put data to shard
func (*BlobNodeClient) StatChunk ¶
func (c *BlobNodeClient) StatChunk(ctx context.Context, location proto.VunitLocation) (ci *ChunkInfo, err error)
StatChunk returns chunk stat
type IBlobNode ¶
type IBlobNode interface { StatChunk(ctx context.Context, location proto.VunitLocation) (ci *ChunkInfo, err error) StatShard(ctx context.Context, location proto.VunitLocation, bid proto.BlobID) (si *ShardInfo, err error) ListShards(ctx context.Context, location proto.VunitLocation) (shards []*ShardInfo, err error) GetShard(ctx context.Context, location proto.VunitLocation, bid proto.BlobID, ioType api.IOType) (body io.ReadCloser, crc32 uint32, err error) PutShard(ctx context.Context, location proto.VunitLocation, bid proto.BlobID, size int64, body io.Reader, ioType api.IOType) (err error) }
IBlobNode define the interface of blobnode used for worker
func NewBlobNodeClient ¶
NewBlobNodeClient returns blobnode client
type ShardInfo ¶
ShardInfo shard info
func (*ShardInfo) MarkDeleted ¶
MarkDeleted return true if shard is mark delete
Click to show internal directories.
Click to hide internal directories.