Documentation ¶
Overview ¶
Package healthgrp provides readiness and liveness check functions for system health monitoring.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) Liveness ¶
func (h *Handler) Liveness(w http.ResponseWriter, r *http.Request)
Liveness returns simple status info if the service is alive. If the app is deployed to a Kubernetes cluster, it will also return pod, node, and namespace details via the Downward API. The Kubernetes environment variables need to be set within your Pod/Deployment manifest.
func (*Handler) Readiness ¶
func (h *Handler) Readiness(w http.ResponseWriter, r *http.Request)
Readiness checks if the database is ready and if not will return a 500 status. Do not respond by just returning an error because further up in the call stack it will interpret that as a non-trusted error.
Click to show internal directories.
Click to hide internal directories.