[#114] Add remove-node IR control command
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
All checks were successful
ci/woodpecker/push/pre-commit Pipeline was successful
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
ea10abb42a
commit
90799497d3
10 changed files with 676 additions and 54 deletions
|
@ -11,6 +11,7 @@ const serviceName = "ircontrol.ControlService"
|
|||
const (
|
||||
rpcHealthCheck = "HealthCheck"
|
||||
rpcTickEpoch = "TickEpoch"
|
||||
rpcRemoveNode = "RemoveNode"
|
||||
)
|
||||
|
||||
// HealthCheck executes ControlService.HealthCheck RPC.
|
||||
|
@ -31,6 +32,14 @@ func TickEpoch(
|
|||
return sendUnary[TickEpochRequest, TickEpochResponse](cli, rpcTickEpoch, req, opts...)
|
||||
}
|
||||
|
||||
func RemoveNode(
|
||||
cli *client.Client,
|
||||
req *RemoveNodeRequest,
|
||||
opts ...client.CallOption,
|
||||
) (*RemoveNodeResponse, error) {
|
||||
return sendUnary[RemoveNodeRequest, RemoveNodeResponse](cli, rpcRemoveNode, 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