[#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

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-03-19 09:55:23 +03:00
parent a85146250b
commit 1772b92182
30 changed files with 1240 additions and 613 deletions

View file

@ -137,6 +137,31 @@ func GenerateSplitInfo(empty bool) *object.SplitInfo {
return m
}
func GenerateECInfo(empty bool) *object.ECInfo {
m := new(object.ECInfo)
if !empty {
m.Chunks = make([]object.ECChunk, 2)
for i := range m.Chunks {
m.Chunks[i] = *GenerateECChunk(false)
}
}
return m
}
func GenerateECChunk(empty bool) *object.ECChunk {
m := new(object.ECChunk)
if !empty {
m.ID = *refstest.GenerateObjectID(false)
m.Index = 4
m.Total = 7
}
return m
}
func GenerateGetRequestBody(empty bool) *object.GetRequestBody {
m := new(object.GetRequestBody)