[#52] object/range: Attach received object header to result

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-09-26 10:50:50 +03:00 committed by Alex Vanin
parent 0490107165
commit abf9ad3573
3 changed files with 30 additions and 9 deletions

View file

@ -1,5 +1,15 @@
package rangesvc
import (
"github.com/nspcc-dev/neofs-node/pkg/core/object"
)
type Result struct {
head *object.Object
stream Streamer
}
type Response struct {
chunk []byte
}
@ -7,3 +17,11 @@ type Response struct {
func (r *Response) PayloadChunk() []byte {
return r.chunk
}
func (r *Result) Head() *object.Object {
return r.head
}
func (r *Result) Stream() Streamer {
return r.stream
}