Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Code generated by goa v3.7.0, DO NOT EDIT.
//
// health client
//
// Command:
// $ goa gen code.vereign.com/gaiax/tsa/cache/design
package health
import (
"context"
goa "goa.design/goa/v3/pkg"
)
// Client is the "health" service client.
type Client struct {
LivenessEndpoint goa.Endpoint
ReadinessEndpoint goa.Endpoint
}
// NewClient initializes a "health" service client given the endpoints.
func NewClient(liveness, readiness goa.Endpoint) *Client {
return &Client{
LivenessEndpoint: liveness,
ReadinessEndpoint: readiness,
}
}
// Liveness calls the "Liveness" endpoint of the "health" service.
func (c *Client) Liveness(ctx context.Context) (err error) {
_, err = c.LivenessEndpoint(ctx, nil)
return
}
// Readiness calls the "Readiness" endpoint of the "health" service.
func (c *Client) Readiness(ctx context.Context) (err error) {
_, err = c.ReadinessEndpoint(ctx, nil)
return
}