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

Make Object Put 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 14:12:57 +03:00 committed by Leonard Lyubich
parent 6e5d7f84af
commit 8972f84672
8 changed files with 89 additions and 49 deletions

View file

@ -20,7 +20,7 @@ type remoteTarget struct {
commonPrm *util.CommonPrm
addr network.Address
addr network.AddressGroup
obj *object.Object
@ -37,7 +37,7 @@ type RemoteSender struct {
// RemotePutPrm groups remote put operation parameters.
type RemotePutPrm struct {
node network.Address
node network.AddressGroup
obj *object.Object
}
@ -86,7 +86,7 @@ func NewRemoteSender(keyStorage *util.KeyStorage, cons ClientConstructor) *Remot
}
// WithNodeAddress sets network address of the remote node.
func (p *RemotePutPrm) WithNodeAddress(v network.Address) *RemotePutPrm {
func (p *RemotePutPrm) WithNodeAddress(v network.AddressGroup) *RemotePutPrm {
if p != nil {
p.node = v
}