[#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:
Leonard Lyubich 2021-06-22 15:19:30 +03:00 committed by Leonard Lyubich
parent ad14df07f6
commit d0e48c949b
9 changed files with 54 additions and 28 deletions

View file

@ -23,11 +23,11 @@ type Service struct {
type Option func(*cfg)
type searchClient interface {
searchObjects(*execCtx, network.Address) ([]*object.ID, error)
searchObjects(*execCtx, network.AddressGroup) ([]*object.ID, error)
}
type ClientConstructor interface {
Get(network.Address) (client.Client, error)
Get(network.AddressGroup) (client.Client, error)
}
type cfg struct {
@ -38,7 +38,7 @@ type cfg struct {
}
clientConstructor interface {
get(network.Address) (searchClient, error)
get(network.AddressGroup) (searchClient, error)
}
traverserGenerator interface {