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
41
42
43
44
45
46
47
48
49
50
// Code generated by goa v3.7.0, DO NOT EDIT.
//
// health endpoints
//
// Command:
// $ goa gen code.vereign.com/gaiax/tsa/cache/design
package health
import (
"context"
goa "goa.design/goa/v3/pkg"
)
// Endpoints wraps the "health" service endpoints.
type Endpoints struct {
Liveness goa.Endpoint
Readiness goa.Endpoint
}
// NewEndpoints wraps the methods of the "health" service with endpoints.
func NewEndpoints(s Service) *Endpoints {
return &Endpoints{
Liveness: NewLivenessEndpoint(s),
Readiness: NewReadinessEndpoint(s),
}
}
// Use applies the given middleware to all the "health" service endpoints.
func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint) {
e.Liveness = m(e.Liveness)
e.Readiness = m(e.Readiness)
}
// NewLivenessEndpoint returns an endpoint function that calls the method
// "Liveness" of service "health".
func NewLivenessEndpoint(s Service) goa.Endpoint {
return func(ctx context.Context, req interface{}) (interface{}, error) {
return nil, s.Liveness(ctx)
}
}
// NewReadinessEndpoint returns an endpoint function that calls the method
// "Readiness" of service "health".
func NewReadinessEndpoint(s Service) goa.Endpoint {
return func(ctx context.Context, req interface{}) (interface{}, error) {
return nil, s.Readiness(ctx)
}
}