forked from TrueCloudLab/frostfs-node
[#57] services/object: Combine common service parameters
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
8cddbe58a6
commit
39c17253be
24 changed files with 109 additions and 61 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"github.com/nspcc-dev/neofs-api-go/pkg/object"
|
||||
objectV2 "github.com/nspcc-dev/neofs-api-go/v2/object"
|
||||
getsvc "github.com/nspcc-dev/neofs-node/pkg/services/object/get"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/services/object/util"
|
||||
)
|
||||
|
||||
func toPrm(req *objectV2.GetRequest) *getsvc.Prm {
|
||||
|
@ -11,7 +12,7 @@ func toPrm(req *objectV2.GetRequest) *getsvc.Prm {
|
|||
WithAddress(
|
||||
object.NewAddressFromV2(req.GetBody().GetAddress()),
|
||||
).
|
||||
OnlyLocal(req.GetMetaHeader().GetTTL() == 1) // FIXME: use constant
|
||||
WithCommonPrm(util.CommonPrmFromV2(req))
|
||||
}
|
||||
|
||||
func fromResponse(res *getsvc.Streamer) objectV2.GetObjectStreamer {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue