[#397] cli: Fix evacuation method names
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
2613351008
commit
9119199f6e
2 changed files with 25 additions and 25 deletions
|
@ -67,7 +67,7 @@ func startEvacuateShard(cmd *cobra.Command, _ []string) {
|
|||
var resp *control.StartShardEvacuationResponse
|
||||
var err error
|
||||
err = cli.ExecRaw(func(client *client.Client) error {
|
||||
resp, err = control.StartEvacuateShard(client, req)
|
||||
resp, err = control.StartShardEvacuation(client, req)
|
||||
return err
|
||||
})
|
||||
commonCmd.ExitOnErr(cmd, "Start evacuate shards failed, rpc error: %w", err)
|
||||
|
@ -95,7 +95,7 @@ func getEvacuateShardStatus(cmd *cobra.Command, _ []string) {
|
|||
var resp *control.GetShardEvacuationStatusResponse
|
||||
var err error
|
||||
err = cli.ExecRaw(func(client *client.Client) error {
|
||||
resp, err = control.GetEvacuateShardStatus(client, req)
|
||||
resp, err = control.GetShardEvacuationStatus(client, req)
|
||||
return err
|
||||
})
|
||||
commonCmd.ExitOnErr(cmd, "Get evacuate shards status failed, rpc error: %w", err)
|
||||
|
@ -118,7 +118,7 @@ func stopEvacuateShardStatus(cmd *cobra.Command, _ []string) {
|
|||
var resp *control.StopShardEvacuationResponse
|
||||
var err error
|
||||
err = cli.ExecRaw(func(client *client.Client) error {
|
||||
resp, err = control.StopEvacuateShard(client, req)
|
||||
resp, err = control.StopShardEvacuation(client, req)
|
||||
return err
|
||||
})
|
||||
commonCmd.ExitOnErr(cmd, "Stop evacuate shards failed, rpc error: %w", err)
|
||||
|
@ -166,7 +166,7 @@ func waitEvacuateCompletion(cmd *cobra.Command, pk *ecdsa.PrivateKey, cli *clien
|
|||
|
||||
var err error
|
||||
err = cli.ExecRaw(func(client *client.Client) error {
|
||||
resp, err = control.GetEvacuateShardStatus(client, req)
|
||||
resp, err = control.GetShardEvacuationStatus(client, req)
|
||||
return err
|
||||
})
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@ const (
|
|||
rpcSetShardMode = "SetShardMode"
|
||||
rpcSynchronizeTree = "SynchronizeTree"
|
||||
rpcEvacuateShard = "EvacuateShard"
|
||||
rpcStartEvacuateShard = "StartEvacuateShard"
|
||||
rpcGetEvacuateShardStatus = "GetEvacuateShardStatus"
|
||||
rpcStopEvacuateShardStatus = "StopEvacuateShard"
|
||||
rpcStartShardEvacuation = "StartShardEvacuation"
|
||||
rpcGetShardEvacuationStatus = "GetShardEvacuationStatus"
|
||||
rpcStopShardEvacuation = "StopShardEvacuation"
|
||||
rpcFlushCache = "FlushCache"
|
||||
rpcDoctor = "Doctor"
|
||||
)
|
||||
|
@ -144,12 +144,12 @@ func EvacuateShard(cli *client.Client, req *EvacuateShardRequest, opts ...client
|
|||
return wResp.message, nil
|
||||
}
|
||||
|
||||
// StartEvacuateShard executes ControlService.StartEvacuateShard RPC.
|
||||
func StartEvacuateShard(cli *client.Client, req *StartShardEvacuationRequest, opts ...client.CallOption) (*StartShardEvacuationResponse, error) {
|
||||
// StartShardEvacuation executes ControlService.StartShardEvacuation RPC.
|
||||
func StartShardEvacuation(cli *client.Client, req *StartShardEvacuationRequest, opts ...client.CallOption) (*StartShardEvacuationResponse, error) {
|
||||
wResp := newResponseWrapper[StartShardEvacuationResponse]()
|
||||
wReq := &requestWrapper{m: req}
|
||||
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcStartEvacuateShard), wReq, wResp, opts...)
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcStartShardEvacuation), wReq, wResp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -157,12 +157,12 @@ func StartEvacuateShard(cli *client.Client, req *StartShardEvacuationRequest, op
|
|||
return wResp.message, nil
|
||||
}
|
||||
|
||||
// GetEvacuateShardStatus executes ControlService.GetEvacuateShardStatus RPC.
|
||||
func GetEvacuateShardStatus(cli *client.Client, req *GetShardEvacuationStatusRequest, opts ...client.CallOption) (*GetShardEvacuationStatusResponse, error) {
|
||||
// GetShardEvacuationStatus executes ControlService.GetShardEvacuationStatus RPC.
|
||||
func GetShardEvacuationStatus(cli *client.Client, req *GetShardEvacuationStatusRequest, opts ...client.CallOption) (*GetShardEvacuationStatusResponse, error) {
|
||||
wResp := newResponseWrapper[GetShardEvacuationStatusResponse]()
|
||||
wReq := &requestWrapper{m: req}
|
||||
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcGetEvacuateShardStatus), wReq, wResp, opts...)
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcGetShardEvacuationStatus), wReq, wResp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -170,12 +170,12 @@ func GetEvacuateShardStatus(cli *client.Client, req *GetShardEvacuationStatusReq
|
|||
return wResp.message, nil
|
||||
}
|
||||
|
||||
// StopEvacuateShard executes ControlService.StopEvacuateShard RPC.
|
||||
func StopEvacuateShard(cli *client.Client, req *StopShardEvacuationRequest, opts ...client.CallOption) (*StopShardEvacuationResponse, error) {
|
||||
// StopShardEvacuation executes ControlService.StopShardEvacuation RPC.
|
||||
func StopShardEvacuation(cli *client.Client, req *StopShardEvacuationRequest, opts ...client.CallOption) (*StopShardEvacuationResponse, error) {
|
||||
wResp := newResponseWrapper[StopShardEvacuationResponse]()
|
||||
wReq := &requestWrapper{m: req}
|
||||
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcStopEvacuateShardStatus), wReq, wResp, opts...)
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcStopShardEvacuation), wReq, wResp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue