forked from TrueCloudLab/frostfs-node
[#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:
parent
59de20fbba
commit
485a5418d2
33 changed files with 653 additions and 1238 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue