[#1793] node: Serve NetmapService.NetmapSnapshot RPC

There is no more need to serve the same request on Control API.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-09-17 16:37:01 +04:00 committed by fyrchik
parent 59de20fbba
commit 485a5418d2
33 changed files with 653 additions and 1238 deletions

View file

@ -9,7 +9,6 @@ const serviceName = "control.ControlService"
const (
rpcHealthCheck = "HealthCheck"
rpcNetmapSnapshot = "NetmapSnapshot"
rpcSetNetmapStatus = "SetNetmapStatus"
rpcDropObjects = "DropObjects"
rpcListShards = "ListShards"
@ -42,28 +41,6 @@ func HealthCheck(
return wResp.m, nil
}
// NetmapSnapshot executes ControlService.NetmapSnapshot RPC.
func NetmapSnapshot(
cli *client.Client,
req *NetmapSnapshotRequest,
opts ...client.CallOption,
) (*NetmapSnapshotResponse, error) {
wResp := &netmapSnapshotResponseWrapper{
m: new(NetmapSnapshotResponse),
}
wReq := &requestWrapper{
m: req,
}
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcNetmapSnapshot), wReq, wResp, opts...)
if err != nil {
return nil, err
}
return wResp.m, nil
}
// SetNetmapStatus executes ControlService.SetNetmapStatus RPC.
func SetNetmapStatus(
cli *client.Client,