health

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

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 = [1]string{"GetStatus"}

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 MakeInternal

func MakeInternal(err error) *goa.ServiceError

MakeInternal builds a goa.ServiceError from an error.

func NewGetStatusEndpoint

func NewGetStatusEndpoint(s Service) goa.Endpoint

NewGetStatusEndpoint returns an endpoint function that calls the method "GetStatus" of service "health".

Types

type Client

type Client struct {
	GetStatusEndpoint goa.Endpoint
}

Client is the "health" service client.

func NewClient

func NewClient(getStatus goa.Endpoint) *Client

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

func (*Client) GetStatus

func (c *Client) GetStatus(ctx context.Context) (res *HealthStatusResponse, err error)

GetStatus calls the "GetStatus" endpoint of the "health" service.

type Endpoints

type Endpoints struct {
	GetStatus 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 HealthStatus

type HealthStatus struct {
}

Status defines the structure for health information

type HealthStatusResponse

type HealthStatusResponse struct {
	// Status of the response.
	S string
	// Error message.
	Errmsg *string
	Data   *HealthStatus
	Status string
}

HealthStatusResponse is the result type of the health service GetStatus method.

type Service

type Service interface {
	// Get current backend health status
	GetStatus(context.Context) (res *HealthStatusResponse, err error)
}

HealthAPI allows to check if backend data is up-to-date and reliable or not.

Jump to

Keyboard shortcuts

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