forked from TrueCloudLab/frostfs-api-go
Alex Vanin
f69d2ad83c
Due to source code relocation from GitHub. Signed-off-by: Alex Vanin <a.vanin@yadro.com>
29 lines
742 B
Go
29 lines
742 B
Go
package rpc
|
|
|
|
import (
|
|
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/accounting"
|
|
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/client"
|
|
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/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
|
|
}
|