frostfs-node/pkg/services/object/search/remote.go
Leonard Lyubich d0e48c949b [#607] object/search: Make client constructor to work with group address
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>
2021-06-28 15:52:50 +03:00

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)
}