[#193] services/object: Support client options in all Object services

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-11-23 15:59:06 +03:00 committed by Alex Vanin
parent 27fc4d6e01
commit 9148980bd0
14 changed files with 71 additions and 8 deletions

View file

@ -3,6 +3,7 @@ package putsvc
import (
"context"
"github.com/nspcc-dev/neofs-api-go/pkg/client"
"github.com/nspcc-dev/neofs-node/pkg/core/container"
"github.com/nspcc-dev/neofs-node/pkg/core/netmap"
"github.com/nspcc-dev/neofs-node/pkg/core/object"
@ -53,6 +54,8 @@ type cfg struct {
clientCache *cache.ClientCache
log *logger.Logger
clientOpts []client.Option
}
func defaultCfg() *cfg {
@ -148,3 +151,9 @@ func WithLogger(l *logger.Logger) Option {
c.log = l
}
}
func WithClientOptions(opts ...client.Option) Option {
return func(c *cfg) {
c.clientOpts = opts
}
}