forked from TrueCloudLab/frostfs-node
[#486] node: Add PutSingle wrappers
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
9be5d44a46
commit
7b76527759
11 changed files with 148 additions and 3 deletions
|
@ -120,6 +120,22 @@ func (s *SignService) Head(ctx context.Context, req *object.HeadRequest) (*objec
|
|||
return resp.(*object.HeadResponse), nil
|
||||
}
|
||||
|
||||
func (s *SignService) PutSingle(ctx context.Context, req *object.PutSingleRequest) (*object.PutSingleResponse, error) {
|
||||
resp, err := s.sigSvc.HandleUnaryRequest(ctx, req,
|
||||
func(ctx context.Context, req any) (util.ResponseMessage, error) {
|
||||
return s.svc.PutSingle(ctx, req.(*object.PutSingleRequest))
|
||||
},
|
||||
func() util.ResponseMessage {
|
||||
return new(object.PutSingleResponse)
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp.(*object.PutSingleResponse), nil
|
||||
}
|
||||
|
||||
func (s *searchStreamSigner) Send(resp *object.SearchResponse) error {
|
||||
s.nonEmptyResp = true
|
||||
return s.respWriter(resp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue