[#138] v2/netmap: Update to neofs-api jindo release

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-09-08 13:19:22 +03:00 committed by Stanislav Bogatyrev
parent b19e3a48db
commit c0cc4a4374
6 changed files with 173 additions and 48 deletions

View file

@ -11,6 +11,7 @@ type Filter struct {
type Selector struct {
name string
count uint32
clause Clause
attribute string
filter string
}
@ -47,6 +48,9 @@ type NodeInfo struct {
// NodeState of storage node.
type NodeState uint32
// Clause of placement selector.
type Clause uint32
const (
UnspecifiedState NodeState = iota
Online
@ -65,6 +69,12 @@ const (
AND
)
const (
UnspecifiedClause Clause = iota
Same
Distinct
)
func (f *Filter) GetFilters() []*Filter {
if f != nil {
return f.filters
@ -162,6 +172,20 @@ func (s *Selector) SetAttribute(attribute string) {
}
}
func (s *Selector) GetClause() Clause {
if s != nil {
return s.clause
}
return UnspecifiedClause
}
func (s *Selector) SetClause(clause Clause) {
if s != nil {
s.clause = clause
}
}
func (s *Selector) GetCount() uint32 {
if s != nil {
return s.count