Version: v0.0.0-...-6bf1803 Latest Latest

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

Go to latest
Published: Nov 17, 2020 License: Apache-2.0 Imports: 3 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Check

type Check struct {
	// contains filtered or unexported fields

Check implements the API for readiness and healt

func NewAPI

func NewAPI(app string, instance string) *Check

NewAPI creates a health check API

func (*Check) AddHandlersTo

func (h *Check) AddHandlersTo(router *mux.Router)

AddHandlersTo add the liveness, readiness and info handlers to the router

func (*Check) RegisterHealthCondition

func (h *Check) RegisterHealthCondition(condition ConditionCheck)

RegisterHealthCondition registers functions that determin whether the systeam is healthy

func (*Check) RegisterReadynessCondition

func (h *Check) RegisterReadynessCondition(condition ConditionCheck)

RegisterReadynessCondition registers functions that determin whether the systeam is ready to be used

type Condition

type Condition struct {
	Ready   bool   `json:"ready"`
	Message string `json:"message,omitempty"`
	Name    string `json:"name"`

Condition contains the information regarding the status of a piece of the System

type ConditionCheck

type ConditionCheck func() Condition

ConditionCheck defines the API for functions that check the condition of the system

Source Files

Jump to

Keyboard shortcuts

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