Skip to content

Commit

Permalink
services/object: Inline intermediate PUT service
Browse files Browse the repository at this point in the history
Continues f36289d.

Signed-off-by: Leonard Lyubich <[email protected]>
  • Loading branch information
cthulhu-rider committed Dec 26, 2024
1 parent c19595f commit 9c3a3b9
Show file tree
Hide file tree
Showing 6 changed files with 197 additions and 337 deletions.
12 changes: 3 additions & 9 deletions cmd/neofs-node/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
getsvcV2 "github.com/nspcc-dev/neofs-node/pkg/services/object/get/v2"
headsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/head"
putsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/put"
putsvcV2 "github.com/nspcc-dev/neofs-node/pkg/services/object/put/v2"
searchsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/search"
"github.com/nspcc-dev/neofs-node/pkg/services/object/split"
"github.com/nspcc-dev/neofs-node/pkg/services/object/tombstone"
Expand All @@ -46,7 +45,7 @@ import (
)

type objectSvc struct {
put *putsvcV2.Service
put *putsvc.Service

search *searchsvc.Service

Expand All @@ -66,7 +65,7 @@ func (c *cfg) MaxObjectSize() uint64 {
return sz
}

func (s *objectSvc) Put(ctx context.Context) (objectService.PutObjectStream, error) {
func (s *objectSvc) Put(ctx context.Context) (*putsvc.Streamer, error) {
return s.put.Put(ctx)
}

Expand Down Expand Up @@ -264,11 +263,6 @@ func initObjectService(c *cfg) {
putsvc.WithTombstoneVerifier(tombstone.NewVerifier(objectSource{sGet, sSearch})),
)

sPutV2 := putsvcV2.NewService(
putsvcV2.WithInternalService(sPut),
putsvcV2.WithKey(&c.key.PrivateKey),
)

sDelete := deletesvc.New(
deletesvc.WithLogger(c.log),
deletesvc.WithPutService(sPut),
Expand All @@ -282,7 +276,7 @@ func initObjectService(c *cfg) {
)

objSvc := &objectSvc{
put: sPutV2,
put: sPut,
search: sSearch,
get: sGetV2,
delete: sDelete,
Expand Down
61 changes: 0 additions & 61 deletions pkg/services/object/put/v2/service.go

This file was deleted.

208 changes: 0 additions & 208 deletions pkg/services/object/put/v2/streamer.go

This file was deleted.

47 changes: 0 additions & 47 deletions pkg/services/object/put/v2/util.go

This file was deleted.

Loading

0 comments on commit 9c3a3b9

Please sign in to comment.