kubernetes/vendor/go.etcd.io/etcd/server/v3/etcdserver/api/etcdhttp/health.go

const PathHealth

const PathProxyHealth

const HealthStatusSuccess

const HealthStatusError

const checkTypeLivez

const checkTypeReadyz

const checkTypeHealth

type ServerHealth

type serverHealthV2V3

// HandleHealthForV2 registers metrics and health handlers for v2.
func HandleHealthForV2(lg *zap.Logger, mux *http.ServeMux, srv etcdserver.ServerV2) {}

// HandleHealth registers metrics and health handlers. it checks health by using v3 range request
// and its corresponding timeout.
func HandleHealth(lg *zap.Logger, mux *http.ServeMux, srv ServerHealth) {}

// NewHealthHandler handles '/health' requests.
func NewHealthHandler(lg *zap.Logger, hfunc func(ctx context.Context, excludedAlarms StringSet, Serializable bool) Health) http.HandlerFunc {}

var healthSuccess

var healthFailed

var healthCheckGauge

var healthCheckCounter

func init() {}

type Health

type HealthStatus

func getQuerySet(r *http.Request, query string) StringSet {}

func getSerializableFlag(r *http.Request) bool {}

func checkAlarms(lg *zap.Logger, srv serverHealthV2V3, excludedAlarms StringSet) Health {}

func checkLeader(lg *zap.Logger, srv serverHealthV2V3, serializable bool) Health {}

func checkV2API(ctx context.Context, lg *zap.Logger, srv etcdserver.ServerV2) Health {}

func checkAPI(ctx context.Context, lg *zap.Logger, srv ServerHealth, serializable bool) Health {}

type HealthCheck

type CheckRegistry

func installLivezEndpoints(lg *zap.Logger, mux *http.ServeMux, server ServerHealth) {}

func installReadyzEndpoints(lg *zap.Logger, mux *http.ServeMux, server ServerHealth) {}

func (reg *CheckRegistry) Register(name string, check HealthCheck) {}

func (reg *CheckRegistry) RootPath() string {}

func (reg *CheckRegistry) InstallHttpEndpoints(lg *zap.Logger, mux *http.ServeMux) {}

func (reg *CheckRegistry) runHealthChecks(ctx context.Context, checkNames ...string) HealthStatus {}

// installRootHttpEndpoint installs the http handler for the root path.
func (reg *CheckRegistry) installRootHttpEndpoint(lg *zap.Logger, mux *http.ServeMux, checks ...string) {}

// newHealthHandler generates a http HandlerFunc for a health check function hfunc.
func newHealthHandler(path string, lg *zap.Logger, hfunc func(*http.Request) HealthStatus) http.HandlerFunc {}

func filterCheckList(lg *zap.Logger, checks StringSet, excluded StringSet) []string {}

// formatQuoted returns a formatted string of the health check names,
// preserving the order passed in.
func formatQuoted(names ...string) string {}

type StringSet

func (s StringSet) List() []string {}

func listToStringSet(list []string) StringSet {}

func recordMetrics(checkType, name string, status string) {}

// activeAlarmCheck checks if a specific alarm type is active in the server.
func activeAlarmCheck(srv ServerHealth, at pb.AlarmType) func(context.Context) error {}

func readCheck(srv ServerHealth, serializable bool) func(ctx context.Context) error {}