[#83] object: Regenerate protobufs for ECHeader
All checks were successful
Tests and linters / Tests (1.19) (pull_request) Successful in 11m59s
Tests and linters / Tests (1.20) (pull_request) Successful in 12m5s
DCO action / DCO (pull_request) Successful in 12m27s
Tests and linters / Tests with -race (pull_request) Successful in 12m25s
Tests and linters / Lint (pull_request) Successful in 12m52s
All checks were successful
Tests and linters / Tests (1.19) (pull_request) Successful in 11m59s
Tests and linters / Tests (1.20) (pull_request) Successful in 12m5s
DCO action / DCO (pull_request) Successful in 12m27s
Tests and linters / Tests with -race (pull_request) Successful in 12m25s
Tests and linters / Lint (pull_request) Successful in 12m52s
* Fix marshalers and converters; * Fix unit-tests. Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
4fe42ac4ad
commit
0803bc6ded
5 changed files with 103 additions and 83 deletions
|
@ -26,13 +26,13 @@ const (
|
|||
splitHdrChildrenField = 5
|
||||
splitHdrSplitIDField = 6
|
||||
|
||||
ecHdrParentField = 1
|
||||
ecHdrIndexField = 2
|
||||
ecHdrTotalField = 3
|
||||
ecHdrHeaderLengthField = 4
|
||||
ecHdrHeaderField = 5
|
||||
ecHdrParentSplitID = 6
|
||||
ecHdrParentSplitIndex = 7
|
||||
ecHdrParentField = 1
|
||||
ecHdrIndexField = 2
|
||||
ecHdrTotalField = 3
|
||||
ecHdrHeaderLengthField = 4
|
||||
ecHdrHeaderField = 5
|
||||
ecHdrParentSplitID = 6
|
||||
ecHdrParentSplitParentID = 7
|
||||
|
||||
hdrVersionField = 1
|
||||
hdrContainerIDField = 2
|
||||
|
@ -264,7 +264,7 @@ func (h *ECHeader) StableMarshal(buf []byte) []byte {
|
|||
offset += proto.UInt32Marshal(ecHdrHeaderLengthField, buf[offset:], h.HeaderLength)
|
||||
offset += proto.BytesMarshal(ecHdrHeaderField, buf[offset:], h.Header)
|
||||
offset += proto.BytesMarshal(ecHdrParentSplitID, buf[offset:], h.ParentSplitID)
|
||||
proto.UInt32Marshal(ecHdrParentSplitIndex, buf[offset:], h.ParentSplitIndex)
|
||||
proto.NestedStructureMarshal(ecHdrParentSplitParentID, buf[offset:], h.ParentSplitParentID)
|
||||
return buf
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,7 @@ func (h *ECHeader) StableSize() (size int) {
|
|||
size += proto.UInt32Size(ecHdrHeaderLengthField, h.HeaderLength)
|
||||
size += proto.BytesSize(ecHdrHeaderField, h.Header)
|
||||
size += proto.BytesSize(ecHdrParentSplitID, h.ParentSplitID)
|
||||
size += proto.UInt32Size(ecHdrParentSplitIndex, h.ParentSplitIndex)
|
||||
size += proto.NestedStructureSize(ecHdrParentSplitParentID, h.ParentSplitParentID)
|
||||
|
||||
return size
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue