forked from TrueCloudLab/frostfs-node
[#607] object/search: Make client constructor to work with group address
Make Object Search 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:
parent
ad14df07f6
commit
d0e48c949b
9 changed files with 54 additions and 28 deletions
|
@ -68,7 +68,7 @@ func (w *uniqueIDWriter) WriteIDs(list []*objectSDK.ID) error {
|
|||
return w.writer.WriteIDs(list)
|
||||
}
|
||||
|
||||
func (c *clientConstructorWrapper) get(addr network.Address) (searchClient, error) {
|
||||
func (c *clientConstructorWrapper) get(addr network.AddressGroup) (searchClient, error) {
|
||||
clt, err := c.constructor.Get(addr)
|
||||
|
||||
return &clientWrapper{
|
||||
|
@ -76,7 +76,7 @@ func (c *clientConstructorWrapper) get(addr network.Address) (searchClient, erro
|
|||
}, err
|
||||
}
|
||||
|
||||
func (c *clientWrapper) searchObjects(exec *execCtx, addr network.Address) ([]*objectSDK.ID, error) {
|
||||
func (c *clientWrapper) searchObjects(exec *execCtx, addr network.AddressGroup) ([]*objectSDK.ID, error) {
|
||||
if exec.prm.forwarder != nil {
|
||||
return exec.prm.forwarder(addr, c.client)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue