forked from TrueCloudLab/frostfs-node
[#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>
This commit is contained in:
parent
91cc33bdb9
commit
7b228b7603
25 changed files with 114 additions and 72 deletions
|
@ -5,7 +5,7 @@ import (
|
|||
|
||||
cid "github.com/nspcc-dev/neofs-api-go/pkg/container/id"
|
||||
objectSDK "github.com/nspcc-dev/neofs-api-go/pkg/object"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/network"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/client"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/object_manager/placement"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
|
||||
"go.uber.org/zap"
|
||||
|
@ -117,8 +117,8 @@ func (exec *execCtx) generateTraverser(cid *cid.ID) (*placement.Traverser, bool)
|
|||
}
|
||||
}
|
||||
|
||||
func (exec execCtx) remoteClient(node network.AddressGroup) (searchClient, bool) {
|
||||
c, err := exec.svc.clientConstructor.get(node)
|
||||
func (exec execCtx) remoteClient(info client.NodeInfo) (searchClient, bool) {
|
||||
c, err := exec.svc.clientConstructor.get(info)
|
||||
switch {
|
||||
default:
|
||||
exec.status = statusUndefined
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue