forked from TrueCloudLab/frostfs-node
[#549] network/cache: Change Get
signature
Make network cache's `Get` method accept `network.Address` argument instead of string. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
e10981a7d3
commit
33bef46f31
19 changed files with 83 additions and 85 deletions
|
@ -80,8 +80,13 @@ func (p *testPlacementBuilder) BuildPlacement(addr *objectSDK.Address, _ *netmap
|
|||
return vs, nil
|
||||
}
|
||||
|
||||
func (c *testClientCache) get(addr string) (getClient, error) {
|
||||
v, ok := c.clients[addr]
|
||||
func (c *testClientCache) get(mAddr *network.Address) (getClient, error) {
|
||||
hostAddr, err := mAddr.HostAddrString()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
v, ok := c.clients[hostAddr]
|
||||
if !ok {
|
||||
return nil, errors.New("could not construct client")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue