[#137] sdk: Implement netmap filtering and selection
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
efbf73b775
commit
2026473733
13 changed files with 1229 additions and 0 deletions
19
pkg/netmap/container.go
Normal file
19
pkg/netmap/container.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package netmap
|
||||
|
||||
// ContainerNodes represents nodes in the container.
|
||||
type ContainerNodes interface {
|
||||
Replicas() []Nodes
|
||||
Flatten() Nodes
|
||||
}
|
||||
|
||||
type containerNodes []Nodes
|
||||
|
||||
// Flatten returns list of all nodes from the container.
|
||||
func (c containerNodes) Flatten() Nodes {
|
||||
return flattenNodes(c)
|
||||
}
|
||||
|
||||
// Replicas return list of container replicas.
|
||||
func (c containerNodes) Replicas() []Nodes {
|
||||
return c
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue