forked from TrueCloudLab/frostfs-node
[#733] frostfs-cli: Add control ir remove-container
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
f2437f7ae9
commit
189dbb01be
14 changed files with 806 additions and 110 deletions
|
@ -9,9 +9,10 @@ import (
|
|||
const serviceName = "ircontrol.ControlService"
|
||||
|
||||
const (
|
||||
rpcHealthCheck = "HealthCheck"
|
||||
rpcTickEpoch = "TickEpoch"
|
||||
rpcRemoveNode = "RemoveNode"
|
||||
rpcHealthCheck = "HealthCheck"
|
||||
rpcTickEpoch = "TickEpoch"
|
||||
rpcRemoveNode = "RemoveNode"
|
||||
rpcRemoveContainer = "RemoveContainer"
|
||||
)
|
||||
|
||||
// HealthCheck executes ControlService.HealthCheck RPC.
|
||||
|
@ -40,6 +41,14 @@ func RemoveNode(
|
|||
return sendUnary[RemoveNodeRequest, RemoveNodeResponse](cli, rpcRemoveNode, req, opts...)
|
||||
}
|
||||
|
||||
func RemoveContainer(
|
||||
cli *client.Client,
|
||||
req *RemoveContainerRequest,
|
||||
opts ...client.CallOption,
|
||||
) (*RemoveContainerResponse, error) {
|
||||
return sendUnary[RemoveContainerRequest, RemoveContainerResponse](cli, rpcRemoveContainer, req, opts...)
|
||||
}
|
||||
|
||||
func sendUnary[I, O grpc.Message](cli *client.Client, rpcName string, req *I, opts ...client.CallOption) (*O, error) {
|
||||
var resp O
|
||||
wResp := &responseWrapper[*O]{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue