diff --git a/cmd/frostfs-node/object.go b/cmd/frostfs-node/object.go index da7458170..3f0db1461 100644 --- a/cmd/frostfs-node/object.go +++ b/cmd/frostfs-node/object.go @@ -397,9 +397,7 @@ func createDeleteService(c *cfg, keyStorage *util.KeyStorage, sGet *getsvc.Servi } func createDeleteServiceV2(sDelete *deletesvc.Service) *deletesvcV2.Service { - return deletesvcV2.NewService( - deletesvcV2.WithInternalService(sDelete), - ) + return deletesvcV2.NewService(sDelete) } func createSplitService(c *cfg, sPutV2 *putsvcV2.Service, sGetV2 *getsvcV2.Service, diff --git a/pkg/services/object/delete/v2/service.go b/pkg/services/object/delete/v2/service.go index 51759c5df..10dcd0e87 100644 --- a/pkg/services/object/delete/v2/service.go +++ b/pkg/services/object/delete/v2/service.go @@ -9,26 +9,13 @@ import ( // Service implements Delete operation of Object service v2. type Service struct { - *cfg -} - -// Option represents Service constructor option. -type Option func(*cfg) - -type cfg struct { svc *deletesvc.Service } // NewService constructs Service instance from provided options. -func NewService(opts ...Option) *Service { - c := new(cfg) - - for i := range opts { - opts[i](c) - } - +func NewService(svc *deletesvc.Service) *Service { return &Service{ - cfg: c, + svc: svc, } } @@ -51,9 +38,3 @@ func (s *Service) Delete(ctx context.Context, req *objectV2.DeleteRequest) (*obj return resp, nil } - -func WithInternalService(v *deletesvc.Service) Option { - return func(c *cfg) { - c.svc = v - } -}