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 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.
Click to show internal directories.
Click to hide internal directories.