diff --git a/cmd/s3-gw/app.go b/cmd/s3-gw/app.go index bdbc102..6b95b7b 100644 --- a/cmd/s3-gw/app.go +++ b/cmd/s3-gw/app.go @@ -158,15 +158,12 @@ func newApp(ctx context.Context, l *zap.Logger, v *viper.Viper) *App { NotificationController: nc, } - var n neofs.NeoFS - n.SetConnectionPool(conns) - // prepare object layer - obj = layer.NewLayer(l, &layerNeoFS{&n}, layerCfg) + obj = layer.NewLayer(l, &layerNeoFS{&neoFS}, layerCfg) // prepare auth center ctr = auth.New(&neofs.AuthmateNeoFS{ - NeoFS: n, + NeoFS: &neoFS, }, key, getAccessBoxCacheConfig(v, l)) handlerOptions := getHandlerOptions(v, l) diff --git a/internal/neofs/neofs.go b/internal/neofs/neofs.go index 97f0e0c..ca355d6 100644 --- a/internal/neofs/neofs.go +++ b/internal/neofs/neofs.go @@ -512,7 +512,7 @@ func (x *NeoFS) DeleteObject(ctx context.Context, prm layer.PrmObjectDelete) err // AuthmateNeoFS is a mediator which implements authmate.NeoFS through NeoFS. type AuthmateNeoFS struct { - NeoFS + *NeoFS } func (x *AuthmateNeoFS) CreateContainer(ctx context.Context, prm authmate.PrmContainerCreate) (*cid.ID, error) {