forked from TrueCloudLab/frostfs-api-go
[#69] object: Initial EC implementation
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
|
@ -50,6 +50,9 @@ type Selector struct {
|
|||
type Replica struct {
|
||||
count uint32
|
||||
selector string
|
||||
|
||||
ecDataCount uint32
|
||||
ecParityCount uint32
|
||||
}
|
||||
|
||||
type Operation uint32
|
||||
|
@ -259,6 +262,30 @@ func (r *Replica) SetCount(count uint32) {
|
|||
r.count = count
|
||||
}
|
||||
|
||||
func (r *Replica) GetECDataCount() uint32 {
|
||||
if r != nil {
|
||||
return r.ecDataCount
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
func (r *Replica) SetECDataCount(count uint32) {
|
||||
r.ecDataCount = count
|
||||
}
|
||||
|
||||
func (r *Replica) GetECParityCount() uint32 {
|
||||
if r != nil {
|
||||
return r.ecParityCount
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
func (r *Replica) SetECParityCount(count uint32) {
|
||||
r.ecParityCount = count
|
||||
}
|
||||
|
||||
func (p *PlacementPolicy) GetUnique() bool {
|
||||
if p != nil {
|
||||
return p.unique
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue