Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCACertFile = errors.New("CACert file contained no certificates")
Functions ¶
func RecordActiveHealthCheckContext ¶
func RecordActiveHealthCheckContext(hcc *HealthCheckContext)
Types ¶
type HealthCheckContext ¶
type HealthCheckContext struct {
ListenerName string
BuildNumber string
EnableHealthEndpoint bool
// contains filtered or unexported fields
}
HealthCheckContext is a type that is used to supply the context needed to build the health check handler and to provide current health status
func ActiveHealthCheckContextForListener ¶
func ActiveHealthCheckContextForListener(listenerName string) *HealthCheckContext
func BuildHealthContextForListener ¶
func BuildHealthContextForListener(name string, kvs kvstore.KVStore) (*HealthCheckContext, error)
func (*HealthCheckContext) AddRouteContext ¶
func (hcc *HealthCheckContext) AddRouteContext(r *route)
AddRouteContext adds the needed route context for performing the healthcheck
func (*HealthCheckContext) GetHealthStatus ¶
func (hcc *HealthCheckContext) GetHealthStatus() *HealthResponse
Return current health status
func (*HealthCheckContext) HealthHandler ¶
func (hcc *HealthCheckContext) HealthHandler() http.HandlerFunc
HealthHandler returns the handler for health checks
type HealthResponse ¶
type HealthResponse struct {
ListenerName string `json:"listenerName"`
BuildNumber string `json:"buildNumber"`
Routes []routeContext `json:"routes"`
}
HealthResponse is used to structure the json response payload for the health check
Click to show internal directories.
Click to hide internal directories.