Documentation ¶
Index ¶
Constants ¶
const ServiceName = "health"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [2]string{"Liveness", "Readiness"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func NewLivenessEndpoint ¶
NewLivenessEndpoint returns an endpoint function that calls the method "Liveness" of service "health".
func NewReadinessEndpoint ¶
NewReadinessEndpoint returns an endpoint function that calls the method "Readiness" of service "health".
Types ¶
type Client ¶
Client is the "health" service client.
type Endpoints ¶
Endpoints wraps the "health" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "health" service with endpoints.
type HealthResponse ¶
type HealthResponse struct { // Service name. Service string // Status message. Status string // Service runtime version. Version string }
HealthResponse is the result type of the health service Liveness method.
type Service ¶
type Service interface { // Liveness implements Liveness. Liveness(context.Context) (res *HealthResponse, err error) // Readiness implements Readiness. Readiness(context.Context) (res *HealthResponse, err error) }
Health service provides health check endpoints.