[#265] v2/rpc: Add SendIntermediateResult RPC

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-04-01 18:11:14 +03:00 committed by Leonard Lyubich
parent 35567afd11
commit 710d1994a4

View file

@ -10,6 +10,7 @@ const serviceReputation = serviceNamePrefix + "reputation.ReputationService"
const (
rpcReputationSendLocalTrust = "SendLocalTrust"
rpcReputationSendIntermediateResult = "SendIntermediateResult"
)
// SendLocalTrust executes ReputationService.SendLocalTrust RPC.
@ -27,3 +28,19 @@ func SendLocalTrust(
return resp, nil
}
// SendIntermediateResult executes ReputationService.SendIntermediateResult RPC.
func SendIntermediateResult(
cli *client.Client,
req *reputation.SendIntermediateResultRequest,
opts ...client.CallOption,
) (*reputation.SendIntermediateResultRequest, error) {
resp := new(reputation.SendIntermediateResultRequest)
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceReputation, rpcReputationSendIntermediateResult), req, resp, opts...)
if err != nil {
return nil, err
}
return resp, nil
}