in go/grpshuffle_client/lib/core.go [88:105]
func HealthCheck(hc *health.HealthClient) (*HealthCheckResponse, error) {
ctx, cancel := context.WithCancel(context.Background())
go func(cancel func()) {
time.Sleep(2500 * time.Millisecond)
cancel()
}(cancel)
res, err := (*hc).Check(ctx, &health.HealthCheckRequest{})
if err != nil {
return nil, err
}
result := &HealthCheckResponse{
Status: health.HealthCheckResponse_ServingStatus_name[int32(res.Status)],
}
return result, nil
}