health

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler defines the http router implementation for health endpoints.

func NewHandler

func NewHandler(db *gorm.DB) *Handler

NewHandler creates a new Handler for health endpoints.

func (*Handler) Live

func (h *Handler) Live(ctx echo.Context) error

Live performs a live check.

@Summary Live healthcheck @Description Performs a live check @Tags health @ID health-live @Produce json @Success 200 {object} ServiceHealth "OK" @Failure 503 {object} ServiceHealth "Service Unavailable" @Router /health/live [get]

func (*Handler) Ready

func (h *Handler) Ready(ctx echo.Context) error

Ready performs readiness check.

@Summary Ready healthcheck @Description Performs readiness check @Tags health @ID health-ready @Success 200 "OK" @Failure 503 {object} ServiceHealth "Service Unavailable" @Router /health/ready [get]

type ServiceHealth

type ServiceHealth struct {
	ServiceStatus ServiceHealthStatus      `json:"status"`
	Description   ServiceHealthDescription `json:"description"`
	CompletedAt   time.Time                `json:"completed_at"`

} // @name ServiceHealth

ServiceHealth defines the health of the service.

type ServiceHealthDescription

type ServiceHealthDescription string // @name serviceHealthDescription

ServiceHealthDescription describes the state of the service status.

type ServiceHealthStatus

type ServiceHealthStatus string // @name serviceHealthStatus

ServiceHealthStatus defines the status of the service.

Jump to

Keyboard shortcuts

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