forked from TrueCloudLab/frostfs-api-go
[#26] netmap: Add NOT and UNIQUE keywords
* Regenerate types.pb.go for netmap grpc * Add unique flag to PlacementPolicy struct Signed-off-by: Airat Arifullin a.arifullin@yadro.com
This commit is contained in:
parent
0c67b8fefa
commit
8266b31092
2 changed files with 13 additions and 0 deletions
BIN
netmap/grpc/types.pb.go
generated
BIN
netmap/grpc/types.pb.go
generated
Binary file not shown.
|
@ -55,6 +55,7 @@ type Replica struct {
|
||||||
type Operation uint32
|
type Operation uint32
|
||||||
|
|
||||||
type PlacementPolicy struct {
|
type PlacementPolicy struct {
|
||||||
|
unique bool
|
||||||
replicas []Replica
|
replicas []Replica
|
||||||
backupFactor uint32
|
backupFactor uint32
|
||||||
selectors []Selector
|
selectors []Selector
|
||||||
|
@ -106,6 +107,7 @@ const (
|
||||||
LE
|
LE
|
||||||
OR
|
OR
|
||||||
AND
|
AND
|
||||||
|
NOT
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -257,6 +259,17 @@ func (r *Replica) SetCount(count uint32) {
|
||||||
r.count = count
|
r.count = count
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *PlacementPolicy) GetUnique() bool {
|
||||||
|
if p != nil {
|
||||||
|
return p.unique
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (p *PlacementPolicy) SetUnique(unique bool) {
|
||||||
|
p.unique = unique
|
||||||
|
}
|
||||||
|
|
||||||
func (p *PlacementPolicy) GetFilters() []Filter {
|
func (p *PlacementPolicy) GetFilters() []Filter {
|
||||||
if p != nil {
|
if p != nil {
|
||||||
return p.filters
|
return p.filters
|
||||||
|
|
Loading…
Reference in a new issue