Documentation ¶
Overview ¶
Package healthcheck provides primitives for running deep healtcheck service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunHealthCheck ¶
func RunHealthCheck(port int, plusClient *client.NginxClient, cnf *configs.Configurator, healthProbeTLSSecret *v1.Secret)
RunHealthCheck starts the deep healthcheck service.
Types ¶
type HealthServer ¶
type HealthServer struct { Server *http.Server URL string UpstreamsForHost func(host string) []string NginxUpstreams func() (*client.Upstreams, error) StreamUpstreamsForName func(host string) []string NginxStreamUpstreams func() (*client.StreamUpstreams, error) }
HealthServer holds data required for running the healthcheck server.
func NewHealthServer ¶
func NewHealthServer(addr string, nc *client.NginxClient, cnf *configs.Configurator, secret *v1.Secret) (*HealthServer, error)
NewHealthServer creates Health Server. If secret is provided, the server is configured with TLS Config.
func (*HealthServer) ListenAndServe ¶
func (hs *HealthServer) ListenAndServe() error
ListenAndServe starts healthcheck server.
func (*HealthServer) Shutdown ¶
func (hs *HealthServer) Shutdown(ctx context.Context) error
Shutdown shuts down healthcheck server.
func (*HealthServer) StreamStats ¶
func (hs *HealthServer) StreamStats(w http.ResponseWriter, r *http.Request)
StreamStats calculates health stats for the TransportServer(s) identified by the service (action) name in the request URL.
func (*HealthServer) UpstreamStats ¶
func (hs *HealthServer) UpstreamStats(w http.ResponseWriter, r *http.Request)
UpstreamStats calculates health stats for the host identified by the hostname in the request URL.
Click to show internal directories.
Click to hide internal directories.