[#26] netmap: Add NOT and UNIQUE keywords #35

Merged
fyrchik merged 1 commit from aarifullin/frostfs-api-go:master into master 2023-05-31 10:03:27 +00:00
2 changed files with 13 additions and 0 deletions

BIN
netmap/grpc/types.pb.go generated

Binary file not shown.

View file

@ -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