forked from TrueCloudLab/frostfs-api-go
[#79] object: Implement Range\RangeHash
requests for EC object
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
df9b65324a
commit
67c6f305b2
3 changed files with 24 additions and 0 deletions
|
@ -117,6 +117,7 @@ const (
|
|||
|
||||
getRangeRespChunkField = 1
|
||||
getRangeRespSplitInfoField = 2
|
||||
getRangeRespECInfoField = 3
|
||||
|
||||
getRangeHashReqBodyAddressField = 1
|
||||
getRangeHashReqBodyRangesField = 2
|
||||
|
@ -1110,6 +1111,10 @@ func (r *GetRangeResponseBody) StableMarshal(buf []byte) []byte {
|
|||
if v != nil {
|
||||
proto.NestedStructureMarshal(getRangeRespSplitInfoField, buf, v)
|
||||
}
|
||||
case *ECInfo:
|
||||
if v != nil {
|
||||
proto.NestedStructureMarshal(getRangeRespECInfoField, buf, v)
|
||||
}
|
||||
default:
|
||||
panic("unknown one of object get range request body type")
|
||||
}
|
||||
|
@ -1132,6 +1137,10 @@ func (r *GetRangeResponseBody) StableSize() (size int) {
|
|||
if v != nil {
|
||||
size = proto.NestedStructureSize(getRangeRespSplitInfoField, v)
|
||||
}
|
||||
case *ECInfo:
|
||||
if v != nil {
|
||||
size = proto.NestedStructureSize(getRangeRespECInfoField, v)
|
||||
}
|
||||
default:
|
||||
panic("unknown one of object get range request body type")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue