frostfs-node/pkg/services/object/patch/streamer.go
Airat Arifullin a4a1c3f18b [#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>
2024-08-16 14:13:09 +00:00

28 lines
731 B
Go

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
}