forked from TrueCloudLab/frostfs-api-go
Add v2
version to go module name
Replace all elements from `v2` to root directory. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
2d70391e31
commit
25da5d2e13
267 changed files with 116 additions and 17991 deletions
46
rpc/reputation.go
Normal file
46
rpc/reputation.go
Normal file
|
@ -0,0 +1,46 @@
|
|||
package rpc
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/reputation"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/rpc/client"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/rpc/common"
|
||||
)
|
||||
|
||||
const serviceReputation = serviceNamePrefix + "reputation.ReputationService"
|
||||
|
||||
const (
|
||||
rpcReputationAnnounceLocalTrust = "AnnounceLocalTrust"
|
||||
rpcReputationAnnounceIntermediateResult = "AnnounceIntermediateResult"
|
||||
)
|
||||
|
||||
// AnnounceLocalTrust executes ReputationService.AnnounceLocalTrust RPC.
|
||||
func AnnounceLocalTrust(
|
||||
cli *client.Client,
|
||||
req *reputation.AnnounceLocalTrustRequest,
|
||||
opts ...client.CallOption,
|
||||
) (*reputation.AnnounceLocalTrustResponse, error) {
|
||||
resp := new(reputation.AnnounceLocalTrustResponse)
|
||||
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceReputation, rpcReputationAnnounceLocalTrust), req, resp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// AnnounceIntermediateResult executes ReputationService.AnnounceIntermediateResult RPC.
|
||||
func AnnounceIntermediateResult(
|
||||
cli *client.Client,
|
||||
req *reputation.AnnounceIntermediateResultRequest,
|
||||
opts ...client.CallOption,
|
||||
) (*reputation.AnnounceIntermediateResultResponse, error) {
|
||||
resp := new(reputation.AnnounceIntermediateResultResponse)
|
||||
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceReputation, rpcReputationAnnounceIntermediateResult), req, resp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue