forked from TrueCloudLab/frostfs-node
d0e48c949b
Make Object Search service to work with `AddressGroup` instead of `Address` in order to support multiple addresses of the storage node. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
29 lines
480 B
Go
29 lines
480 B
Go
package searchsvc
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/nspcc-dev/neofs-node/pkg/network"
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
func (exec *execCtx) processNode(ctx context.Context, addr network.AddressGroup) {
|
|
exec.log.Debug("processing node...")
|
|
|
|
client, ok := exec.remoteClient(addr)
|
|
if !ok {
|
|
return
|
|
}
|
|
|
|
ids, err := client.searchObjects(exec, addr)
|
|
|
|
if err != nil {
|
|
exec.log.Debug("local operation failed",
|
|
zap.String("error", err.Error()),
|
|
)
|
|
|
|
return
|
|
}
|
|
|
|
exec.writeIDList(ids)
|
|
}
|