Documentation
¶
Index ¶
- Constants
- func NewHealthHandler() api.Handler
- type Check
- type Config
- type Handler
- func (h *Handler) GetLivenessEndpoint(response http.ResponseWriter, req *http.Request)
- func (h *Handler) GetReadinessEndpoint(response http.ResponseWriter, req *http.Request)
- func (h *Handler) HeadLivenessEndpoint(response http.ResponseWriter, req *http.Request)
- func (h *Handler) HeadReadinessEndpoint(response http.ResponseWriter, req *http.Request)
- func (h *Handler) Routes() (string, *chi.Mux)
- type Message
- type SHealth
Constants ¶
View Source
const DoSHealth = "health"
Variables ¶
This section is empty.
Functions ¶
func NewHealthHandler ¶
Types ¶
type Config ¶
type Config struct { // Period in seconds, when all health services should run Period int `yaml:"period"` // StartDelay an optional starting delay, after starting the service StartDelay int `yaml:"startdelay"` }
Config configuration for the healthcheck system
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is the default handler factory for HTTP requests against the healthsystem
func (*Handler) GetLivenessEndpoint ¶
func (h *Handler) GetLivenessEndpoint(response http.ResponseWriter, req *http.Request)
GetLivenessEndpoint liveness probe
func (*Handler) GetReadinessEndpoint ¶
func (h *Handler) GetReadinessEndpoint(response http.ResponseWriter, req *http.Request)
GetReadinessEndpoint is this service ready for taking requests, e.g. formerly known as health checksfunc GetReadinessEndpoint(response http.ResponseWriter, req *http.Request) {
func (*Handler) HeadLivenessEndpoint ¶
func (h *Handler) HeadLivenessEndpoint(response http.ResponseWriter, req *http.Request)
HeadLivenessEndpoint liveness probe
func (*Handler) HeadReadinessEndpoint ¶
func (h *Handler) HeadReadinessEndpoint(response http.ResponseWriter, req *http.Request)
HeadReadinessEndpoint is this service ready for taking requests, e.g. formaly known as health checks
type Message ¶
type Message struct { Messages []string `json:"messages"` LastCheck string `json:"lastCheck,omitempty"` }
Msg a health message
type SHealth ¶
type SHealth struct {
// contains filtered or unexported fields
}
SHealthCheck this is the healthcheck service
func NewHealthSystem ¶
NewHealthSystem initialize the complete health system
Click to show internal directories.
Click to hide internal directories.