Alex Vanin
20de74a505
Due to source code relocation from GitHub. Signed-off-by: Alex Vanin <a.vanin@yadro.com>
34 lines
712 B
Go
34 lines
712 B
Go
package control
|
|
|
|
import (
|
|
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/client"
|
|
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/common"
|
|
)
|
|
|
|
const serviceName = "ircontrol.ControlService"
|
|
|
|
const (
|
|
rpcHealthCheck = "HealthCheck"
|
|
)
|
|
|
|
// HealthCheck executes ControlService.HealthCheck RPC.
|
|
func HealthCheck(
|
|
cli *client.Client,
|
|
req *HealthCheckRequest,
|
|
opts ...client.CallOption,
|
|
) (*HealthCheckResponse, error) {
|
|
wResp := &healthCheckResponseWrapper{
|
|
m: new(HealthCheckResponse),
|
|
}
|
|
|
|
wReq := &requestWrapper{
|
|
m: req,
|
|
}
|
|
|
|
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceName, rpcHealthCheck), wReq, wResp, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return wResp.m, nil
|
|
}
|