Documentation
¶
Index ¶
Constants ¶
View Source
const ( HealthCheckDatabase = "database" HealthCheckMeta = "meta" StatusPass = "pass" StatusFail = "fail" )
Variables ¶
This section is empty.
Functions ¶
func GeneralReadinessHandler ¶
func GeneralReadinessHandler(additionalCheckers ...HealthChecker) http.Handler
GeneralReadinessHandler creates a general readiness handler with configurable health checks
Types ¶
type DatabaseHealthChecker ¶
type DatabaseHealthChecker struct {
}
DatabaseHealthChecker checks database connectivity and schema state
func NewDatabaseHealthChecker ¶
func NewDatabaseHealthChecker() *DatabaseHealthChecker
func (*DatabaseHealthChecker) Check ¶
func (d *DatabaseHealthChecker) Check() HealthCheck
type DynamicRouter ¶
type DynamicRouter struct {
// contains filtered or unexported fields
}
func NewDynamicRouter ¶
func NewDynamicRouter() *DynamicRouter
func (*DynamicRouter) ServeHTTP ¶
func (d *DynamicRouter) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*DynamicRouter) SetRouter ¶
func (d *DynamicRouter) SetRouter(router http.Handler)
type HealthCheck ¶
HealthCheck represents a single health check
type HealthChecker ¶
type HealthChecker interface {
Check() HealthCheck
}
HealthChecker defines the interface for health checks
type HealthStatus ¶
type HealthStatus struct {
Status string `json:"status"`
Checks map[string]HealthCheck `json:"checks"`
}
HealthStatus represents the overall health status
Click to show internal directories.
Click to hide internal directories.