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
|
@ -150,7 +150,11 @@ func (p *Streamer) newCommonTarget(prm *PutInitPrm) transformer.ObjectTarget {
|
|||
relay = func(node nodeDesc) error {
|
||||
addr := node.info.Addresses()
|
||||
|
||||
c, err := p.clientConstructor.Get(addr)
|
||||
var info client.NodeInfo
|
||||
|
||||
info.SetAddressGroup(addr)
|
||||
|
||||
c, err := p.clientConstructor.Get(info)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not create SDK client %s: %w", addr, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue