forked from TrueCloudLab/frostfs-node
[#52] object/range: Attach received object header to result
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
0490107165
commit
abf9ad3573
3 changed files with 30 additions and 9 deletions
|
@ -35,12 +35,12 @@ func NewService(opts ...Option) *Service {
|
|||
|
||||
// GetRange calls internal service and returns v2 object payload range stream.
|
||||
func (s *Service) GetRange(ctx context.Context, req *objectV2.GetRangeRequest) (objectV2.GetRangeObjectStreamer, error) {
|
||||
stream, err := s.svc.GetRange(ctx, toPrm(req))
|
||||
r, err := s.svc.GetRange(ctx, toPrm(req))
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "(%T) could not get object payload range data", s)
|
||||
}
|
||||
|
||||
return fromResponse(stream), nil
|
||||
return fromResponse(r.Stream()), nil
|
||||
}
|
||||
|
||||
func WithInternalService(v *rangesvc.Service) Option {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue