[#607] object/get: Make client constructor to work with group address

Make Object Get 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>
This commit is contained in:
Leonard Lyubich 2021-06-22 15:08:17 +03:00 committed by Leonard Lyubich
parent 8972f84672
commit ad14df07f6
9 changed files with 59 additions and 33 deletions

View file

@ -73,7 +73,7 @@ func (s *SimpleObjectWriter) Object() *object.Object {
return s.obj.Object()
}
func (c *clientCacheWrapper) get(addr network.Address) (getClient, error) {
func (c *clientCacheWrapper) get(addr network.AddressGroup) (getClient, error) {
clt, err := c.cache.Get(addr)
return &clientWrapper{
@ -81,7 +81,7 @@ func (c *clientCacheWrapper) get(addr network.Address) (getClient, error) {
}, err
}
func (c *clientWrapper) getObject(exec *execCtx, addr network.Address) (*objectSDK.Object, error) {
func (c *clientWrapper) getObject(exec *execCtx, addr network.AddressGroup) (*objectSDK.Object, error) {
if !exec.assembling && exec.prm.forwarder != nil {
return exec.prm.forwarder(addr, c.client)
}