frostfs-node/pkg/services/object/search/remote.go
Leonard Lyubich 7b228b7603 [#645] *: Construct clients from client.NodeInfo in API client cache
There is a need to have the ability to expand the data needed for client
construction.

Replace `network.AddressGroup` parameter of client cache interfaces with
`client.NodeInfo`.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-09-30 20:57:00 +03:00

29 lines
479 B
Go

package searchsvc
import (
"context"
"github.com/nspcc-dev/neofs-node/pkg/core/client"
"go.uber.org/zap"
)
func (exec *execCtx) processNode(ctx context.Context, info client.NodeInfo) {
exec.log.Debug("processing node...")
client, ok := exec.remoteClient(info)
if !ok {
return
}
ids, err := client.searchObjects(exec, info)
if err != nil {
exec.log.Debug("local operation failed",
zap.String("error", err.Error()),
)
return
}
exec.writeIDList(ids)
}