StatChunk returns chunk stat
(ctx context.Context, location proto.VunitLocation)
| 86 | |
| 87 | // StatChunk returns chunk stat |
| 88 | func (c *BlobNodeClient) StatChunk(ctx context.Context, location proto.VunitLocation) (ci *ChunkInfo, err error) { |
| 89 | ctx = trace.NewContextFromContext(ctx) |
| 90 | span := trace.SpanFromContext(ctx).WithOperation("StatChunk") |
| 91 | info, err := c.cli.StatChunk(ctx, location.Host, &api.StatChunkArgs{DiskID: location.DiskID, Vuid: location.Vuid}) |
| 92 | if err != nil { |
| 93 | span.Debugf("StatChunk failed: location[%+v], code[%d], err[%v]", location, rpc.DetectStatusCode(err), err) |
| 94 | return |
| 95 | } |
| 96 | span.Debugf("StatChunk success: chunk info[%+v], location[%+v]", info, location) |
| 97 | return &ChunkInfo{ChunkInfo: *info}, nil |
| 98 | } |
| 99 | |
| 100 | // GetShard returns shard data |
| 101 | func (c *BlobNodeClient) GetShard(ctx context.Context, location proto.VunitLocation, bid proto.BlobID, ioType api.IOType) (body io.ReadCloser, crc32 uint32, err error) { |
nothing calls this directly
no test coverage detected