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
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue