healthx

package
v0.0.96 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 3 Imported by: 7

Documentation

Index

Constants

View Source
const (
	// AliveCheckPath is the path where information about the life state of the instance is provided.
	AliveCheckPath = "/health/alive"
	// ReadyCheckPath is the path where information about the ready state of the instance is provided.
	ReadyCheckPath = "/health/ready"
)

Variables

This section is empty.

Functions

func Alive

func Alive(w http.ResponseWriter, r *http.Request)

Alive handler

func Ready

func Ready(readyCheckers ReadyCheckers) func(w http.ResponseWriter, r *http.Request)

Ready handler

func RegisterRoutes

func RegisterRoutes(r *chi.Mux, readyCheckers ReadyCheckers)

RegisterRoutes registers health check routes

Types

type ReadyChecker

type ReadyChecker func() error

ReadyChecker should return an error if the component is not ready yet.

type ReadyCheckers

type ReadyCheckers map[string]ReadyChecker

ReadyCheckers is a map of ReadyCheckers.

Jump to

Keyboard shortcuts

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