healthcheck

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: EUPL-1.2 Imports: 4 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker interface {
	GetHealthCheck() Result
}

type Handler

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

func NewHandler

func NewHandler(name string, healthChecks []Checker) *Handler

func (*Handler) HandleHealth

func (h *Handler) HandleHealth(w http.ResponseWriter, r *http.Request)

func (*Handler) HandlerHealthCheck

func (h *Handler) HandlerHealthCheck(w http.ResponseWriter, r *http.Request)

type Result

type Result struct {
	Name         string   `json:"name"`
	Status       Status   `json:"status"`
	ResponseTime float64  `json:"responseTime"`
	HealthChecks []Result `json:"healthChecks"`
}

type Status

type Status string
const StatusError Status = "ERROR"
const StatusOK Status = "OK"

Jump to

Keyboard shortcuts

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