[#60] control: Add GetNetmapStatus method

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2024-06-20 16:03:58 +03:00
parent 9ac74efc41
commit a83eeddb1d
9 changed files with 1770 additions and 1160 deletions

View file

@ -10,6 +10,7 @@ const serviceName = "control.ControlService"
const (
rpcHealthCheck = "HealthCheck"
rpcSetNetmapStatus = "SetNetmapStatus"
rpcGetNetmapStatus = "GetNetmapStatus"
rpcDropObjects = "DropObjects"
rpcListShards = "ListShards"
rpcSetShardMode = "SetShardMode"
@ -70,6 +71,26 @@ func SetNetmapStatus(
return wResp.message, nil
}
// GetNetmapStatus executes ControlService.GetNetmapStatus RPC.
func GetNetmapStatus(
cli *client.Client,
req *GetNetmapStatusRequest,
opts ...client.CallOption,
) (*GetNetmapStatusResponse, error) {
wResp := newResponseWrapper[GetNetmapStatusResponse]()
wReq := &requestWrapper{
m: req,
}
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcGetNetmapStatus), wReq, wResp, opts...)
if err != nil {
return nil, err
}
return wResp.message, nil
}
// DropObjects executes ControlService.DropObjects RPC.
func DropObjects(
cli *client.Client,