[#191] control: Add Doctor RPC
Doctor RPC performs complex operations on the storage engine. Currently only duplicate removal is supported. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
dbc3811ff4
commit
0b9622c418
7 changed files with 824 additions and 231 deletions
|
@ -18,6 +18,7 @@ const (
|
|||
rpcSynchronizeTree = "SynchronizeTree"
|
||||
rpcEvacuateShard = "EvacuateShard"
|
||||
rpcFlushCache = "FlushCache"
|
||||
rpcDoctor = "Doctor"
|
||||
)
|
||||
|
||||
// HealthCheck executes ControlService.HealthCheck RPC.
|
||||
|
@ -191,3 +192,16 @@ func FlushCache(cli *client.Client, req *FlushCacheRequest, opts ...client.CallO
|
|||
|
||||
return wResp.FlushCacheResponse, nil
|
||||
}
|
||||
|
||||
// Doctor executes ControlService.Doctor RPC.
|
||||
func Doctor(cli *client.Client, req *DoctorRequest, opts ...client.CallOption) (*DoctorResponse, error) {
|
||||
wResp := &doctorResponseWrapper{new(DoctorResponse)}
|
||||
wReq := &requestWrapper{m: req}
|
||||
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcDoctor), wReq, wResp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return wResp.DoctorResponse, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue