health

package
v0.0.0-...-76fa24c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const APIName = "dl"

APIName is the name of the API as defined in the design.

View Source
const APIVersion = "0.0.1"

APIVersion is the version of the API as defined in the design.

View Source
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

View Source
var MethodNames = [2]string{"healthz", "livez"}

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 NewHealthzEndpoint

func NewHealthzEndpoint(s Service) goa.Endpoint

NewHealthzEndpoint returns an endpoint function that calls the method "healthz" of service "health".

func NewLivezEndpoint

func NewLivezEndpoint(s Service) goa.Endpoint

NewLivezEndpoint returns an endpoint function that calls the method "livez" of service "health".

Types

type Client

type Client struct {
	HealthzEndpoint goa.Endpoint
	LivezEndpoint   goa.Endpoint
}

Client is the "health" service client.

func NewClient

func NewClient(healthz, livez goa.Endpoint) *Client

NewClient initializes a "health" service client given the endpoints.

func (*Client) Healthz

func (c *Client) Healthz(ctx context.Context) (res bool, err error)

Healthz calls the "healthz" endpoint of the "health" service.

func (*Client) Livez

func (c *Client) Livez(ctx context.Context) (res bool, err error)

Livez calls the "livez" endpoint of the "health" service.

type Endpoints

type Endpoints struct {
	Healthz goa.Endpoint
	Livez   goa.Endpoint
}

Endpoints wraps the "health" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "health" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "health" service endpoints.

type Service

type Service interface {
	// Healthz implements healthz.
	Healthz(context.Context) (res bool, err error)
	// Livez implements livez.
	Livez(context.Context) (res bool, err error)
}

Health service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL