health

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddProbe

func AddProbe(probe Probe)

AddProbe add components probe to global comboHealthManager.

func CreateHttpHandler

func CreateHttpHandler() http.HandlerFunc

CreateHttpHandler create health http handler base on given probe.

Types

type Probe

type Probe interface {
	// MarkReady sets a ready state for the endpoint handlers.
	MarkReady()
	// MarkNotReady sets a not ready state for the endpoint handlers.
	MarkNotReady()
	// IsReady return inner state for the component.
	IsReady() bool
	// Name return probe name identifier
	Name() string
}

Probe represents readiness status of given component.

func NewHealthManager

func NewHealthManager(name string) Probe

NewHealthManager returns a new healthManager.

Jump to

Keyboard shortcuts

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