[#242] put: Pass context to relay function

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-04-12 11:02:25 +03:00 committed by fyrchik
parent 995db117d0
commit 200fc8b882
4 changed files with 12 additions and 10 deletions

View file

@ -36,7 +36,7 @@ type distributedTarget struct {
isLocalKey func([]byte) bool
relay func(nodeDesc) error
relay func(context.Context, nodeDesc) error
fmt *object.FormatValidator
@ -153,7 +153,7 @@ func (t *distributedTarget) Close(ctx context.Context) (*transformer.AccessIdent
func (t *distributedTarget) sendObject(ctx context.Context, node nodeDesc) error {
if !node.local && t.relay != nil {
return t.relay(node)
return t.relay(ctx, node)
}
target := t.nodeTargetInitializer(node)