[#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 PlacementPolicy struct {
|
||||
unique bool
|
||||
replicas []Replica
|
||||
backupFactor uint32
|
||||
selectors []Selector
|
||||
|
@ -106,6 +107,7 @@ const (
|
|||
LE
|
||||
OR
|
||||
AND
|
||||
NOT
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -257,6 +259,17 @@ func (r *Replica) SetCount(count uint32) {
|
|||
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 {
|
||||
if p != nil {
|
||||
return p.filters
|
||||
|
|
Loading…
Reference in a new issue