[#1048] control: Add ListShards
RPC wrappers
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
a6b3e16975
commit
f88a12eaa7
2 changed files with 41 additions and 0 deletions
|
@ -12,6 +12,7 @@ const (
|
|||
rpcNetmapSnapshot = "NetmapSnapshot"
|
||||
rpcSetNetmapStatus = "SetNetmapStatus"
|
||||
rpcDropObjects = "DropObjects"
|
||||
rpcListShards = "ListShards"
|
||||
)
|
||||
|
||||
// HealthCheck executes ControlService.HealthCheck RPC.
|
||||
|
@ -100,3 +101,24 @@ func DropObjects(
|
|||
|
||||
return wResp.m, nil
|
||||
}
|
||||
|
||||
// ListShards executes ControlService.ListShards RPC.
|
||||
func ListShards(
|
||||
cli *client.Client,
|
||||
req *ListShardsRequest,
|
||||
opts ...client.CallOption,
|
||||
) (*ListShardsResponse, error) {
|
||||
wResp := &listShardsRequestWrapper{
|
||||
m: new(ListShardsResponse),
|
||||
}
|
||||
|
||||
wReq := &requestWrapper{
|
||||
m: req,
|
||||
}
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcListShards), wReq, wResp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return wResp.m, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue