forked from TrueCloudLab/frostfs-node
[#531] signSvc: Add SetMarshaledData method call
To reduce memory allocations add `SetMarshaledData` method call to return already marshalled data in next `StableMarshal` calls. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
7b1eda5107
commit
20d6132f31
1 changed files with 1 additions and 0 deletions
|
@ -122,6 +122,7 @@ func (s *SignService) Head(ctx context.Context, req *object.HeadRequest) (*objec
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SignService) PutSingle(ctx context.Context, req *object.PutSingleRequest) (*object.PutSingleResponse, error) {
|
func (s *SignService) PutSingle(ctx context.Context, req *object.PutSingleRequest) (*object.PutSingleResponse, error) {
|
||||||
|
req.GetBody().SetMarshalData(nil)
|
||||||
if err := s.sigSvc.VerifyRequest(req); err != nil {
|
if err := s.sigSvc.VerifyRequest(req); err != nil {
|
||||||
resp := new(object.PutSingleResponse)
|
resp := new(object.PutSingleResponse)
|
||||||
return resp, s.sigSvc.SignResponse(resp, err)
|
return resp, s.sigSvc.SignResponse(resp, err)
|
||||||
|
|
Loading…
Reference in a new issue