forked from TrueCloudLab/frostfs-sdk-go
[#276] Merge repo with frostfs-api-go
Signed-off-by: Pavel Pogodaev <p.pogodaev@yadro.com>
This commit is contained in:
parent
5361f0eceb
commit
6ce73790ea
337 changed files with 66666 additions and 283 deletions
29
api/rpc/accounting.go
Normal file
29
api/rpc/accounting.go
Normal file
|
@ -0,0 +1,29 @@
|
|||
package rpc
|
||||
|
||||
import (
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/accounting"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/rpc/client"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/rpc/common"
|
||||
)
|
||||
|
||||
const serviceAccounting = serviceNamePrefix + "accounting.AccountingService"
|
||||
|
||||
const (
|
||||
rpcAccountingBalance = "Balance"
|
||||
)
|
||||
|
||||
// Balance executes AccountingService.Balance RPC.
|
||||
func Balance(
|
||||
cli *client.Client,
|
||||
req *accounting.BalanceRequest,
|
||||
opts ...client.CallOption,
|
||||
) (*accounting.BalanceResponse, error) {
|
||||
resp := new(accounting.BalanceResponse)
|
||||
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceAccounting, rpcAccountingBalance), req, resp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue