[#1731] services/control: Allow to evacuate data from shard
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
a51b76056e
commit
091d7d30f6
11 changed files with 812 additions and 211 deletions
|
@ -17,6 +17,7 @@ const (
|
|||
rpcDumpShard = "DumpShard"
|
||||
rpcRestoreShard = "RestoreShard"
|
||||
rpcSynchronizeTree = "SynchronizeTree"
|
||||
rpcEvacuateShard = "EvacuateShard"
|
||||
)
|
||||
|
||||
// HealthCheck executes ControlService.HealthCheck RPC.
|
||||
|
@ -186,3 +187,16 @@ func SynchronizeTree(cli *client.Client, req *SynchronizeTreeRequest, opts ...cl
|
|||
|
||||
return wResp.SynchronizeTreeResponse, nil
|
||||
}
|
||||
|
||||
// EvacuateShard executes ControlService.EvacuateShard RPC.
|
||||
func EvacuateShard(cli *client.Client, req *EvacuateShardRequest, opts ...client.CallOption) (*EvacuateShardResponse, error) {
|
||||
wResp := &evacuateShardResponseWrapper{new(EvacuateShardResponse)}
|
||||
wReq := &requestWrapper{m: req}
|
||||
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcEvacuateShard), wReq, wResp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return wResp.EvacuateShardResponse, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue