[#1307] go.mod: Bump frostfs-sdk-go/frostfs-api-go/v2 versions
* Also, resolve dependencies and conflicts for object service by creating stub for `Patch` method. Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
ec1509de4e
commit
a4a1c3f18b
15 changed files with 345 additions and 11 deletions
22
pkg/services/object/patch/service.go
Normal file
22
pkg/services/object/patch/service.go
Normal file
|
@ -0,0 +1,22 @@
|
|||
package patchsvc
|
||||
|
||||
import (
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object"
|
||||
getsvc "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/get"
|
||||
putsvc "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/put"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/util"
|
||||
)
|
||||
|
||||
// Service implements Put operation of Object service v2.
|
||||
type Service struct {
|
||||
}
|
||||
|
||||
// NewService constructs Service instance from provided options.
|
||||
func NewService(_ *util.KeyStorage, _ *getsvc.Service, _ *putsvc.Service) *Service {
|
||||
return &Service{}
|
||||
}
|
||||
|
||||
// Put calls internal service and returns v2 object streamer.
|
||||
func (s *Service) Patch() (object.PatchObjectstream, error) {
|
||||
return &Streamer{}, nil
|
||||
}
|
28
pkg/services/object/patch/streamer.go
Normal file
28
pkg/services/object/patch/streamer.go
Normal file
|
@ -0,0 +1,28 @@
|
|||
package patchsvc
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-observability/tracing"
|
||||
)
|
||||
|
||||
// Streamer for the patch handler is a pipeline that merges two incoming
|
||||
// streams of patches and original object payload chunks.
|
||||
// The merged result is fed to Put stream target.
|
||||
type Streamer struct{}
|
||||
|
||||
func (s *Streamer) Send(ctx context.Context, _ *object.PatchRequest) error {
|
||||
_, span := tracing.StartSpanFromContext(ctx, "patch.streamer.Send")
|
||||
defer span.End()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Streamer) CloseAndRecv(_ context.Context) (*object.PatchResponse, error) {
|
||||
return &object.PatchResponse{
|
||||
Body: &object.PatchResponseBody{
|
||||
ObjectID: nil,
|
||||
},
|
||||
}, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue