[#645] placement: Overload result of Traverser.Next method

In previous implementation `placement.Traverser.Next` method returned slice
of `network.AddressGroup` elements. There is a need to process keys of
storage nodes besides network addresses for intra-container communication.

Wrap `network.AddressGroup` in a new type `placement.Node` that summarizes
the storage node information required for communication. Return slice of
`Node` instances from `Traverser.Next` method. Fix compilation breaks in
dependent packages.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-09-06 14:35:06 +03:00 committed by Alex Vanin
parent 3c848b2cad
commit fe90456dcc
6 changed files with 29 additions and 17 deletions

View file

@ -78,7 +78,7 @@ func (exec *execCtx) processCurrentEpoch() bool {
// TODO: consider parallel execution
// TODO: consider optimization: if status == SPLIT we can continue until
// we reach the best result - split info with linking object ID.
if exec.processNode(ctx, addrs[i]) {
if exec.processNode(ctx, addrs[i].Addresses()) {
exec.log.Debug("completing the operation")
return true
}