[#69] object: Initial EC implementation
All checks were successful
DCO action / DCO (pull_request) Successful in 1m7s
Tests and linters / Tests (1.19) (pull_request) Successful in 1m37s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m33s
Tests and linters / Lint (pull_request) Successful in 1m46s
Tests and linters / Tests with -race (pull_request) Successful in 1m45s
All checks were successful
DCO action / DCO (pull_request) Successful in 1m7s
Tests and linters / Tests (1.19) (pull_request) Successful in 1m37s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m33s
Tests and linters / Lint (pull_request) Successful in 1m46s
Tests and linters / Tests with -race (pull_request) Successful in 1m45s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
a85146250b
commit
1772b92182
30 changed files with 1240 additions and 613 deletions
|
@ -39,6 +39,15 @@ type SplitHeader struct {
|
|||
splitID []byte
|
||||
}
|
||||
|
||||
type ECHeader struct {
|
||||
Parent *refs.ObjectID
|
||||
Index uint32
|
||||
Total uint32
|
||||
Header []byte
|
||||
HeaderLength uint32
|
||||
Signature []byte
|
||||
}
|
||||
|
||||
type Header struct {
|
||||
version *refs.Version
|
||||
|
||||
|
@ -59,6 +68,8 @@ type Header struct {
|
|||
attr []Attribute
|
||||
|
||||
split *SplitHeader
|
||||
|
||||
ec *ECHeader
|
||||
}
|
||||
|
||||
type HeaderWithSignature struct {
|
||||
|
@ -88,6 +99,16 @@ type SplitInfo struct {
|
|||
link *refs.ObjectID
|
||||
}
|
||||
|
||||
type ECChunk struct {
|
||||
ID refs.ObjectID
|
||||
Index uint32
|
||||
Total uint32
|
||||
}
|
||||
|
||||
type ECInfo struct {
|
||||
Chunks []ECChunk
|
||||
}
|
||||
|
||||
type GetRequestBody struct {
|
||||
addr *refs.Address
|
||||
|
||||
|
@ -655,6 +676,17 @@ func (h *Header) SetSplit(v *SplitHeader) {
|
|||
h.split = v
|
||||
}
|
||||
|
||||
func (h *Header) GetEC() *ECHeader {
|
||||
if h != nil {
|
||||
return h.ec
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (h *Header) SetEC(v *ECHeader) {
|
||||
h.ec = v
|
||||
}
|
||||
|
||||
func (h *HeaderWithSignature) GetHeader() *Header {
|
||||
if h != nil {
|
||||
return h.header
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue