[#431] object/search: Re-sign original requests during forwarding

In previous implementation node's Object Search V2 service handler created a
new request for each RPC. Now original requests are re-signed according to
API specification. Logical handler abstracts from this version-dependent
logic through `RequestForwarder` callback.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-04-29 11:54:40 +03:00 committed by Leonard Lyubich
parent 2877a343c3
commit e6b30aed36
3 changed files with 83 additions and 3 deletions

View file

@ -76,9 +76,7 @@ func (c *clientConstructorWrapper) get(addr string) (searchClient, error) {
}
func (c *clientWrapper) searchObjects(exec *execCtx) ([]*objectSDK.ID, error) {
return c.client.SearchObject(exec.context(),
exec.remotePrm(),
exec.callOptions()...)
return exec.prm.forwarder(c.client)
}
func (e *storageEngineWrapper) search(exec *execCtx) ([]*objectSDK.ID, error) {