healthchecks

package
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcHealthCheck

type GrpcHealthCheck struct {
	// contains filtered or unexported fields
}

func NewGrpcHealthCheck

func NewGrpcHealthCheck(conf *hcconf.GrpcHealthCheck, timeout time.Duration, tlsEnabled bool, tlsConf *tls.Config) *GrpcHealthCheck

func (*GrpcHealthCheck) Check

func (h *GrpcHealthCheck) Check(host string) error

type GrpcHealthCheckOpt

type GrpcHealthCheckOpt struct {
	// `grpc.health.v1.HealthCheckRequest
	// <https://github.com/grpc/grpc/blob/master/src/proto/grpc/health/v1/health.proto#L20>`_.
	// message. See `gRPC health-checking overview
	// <https://github.com/grpc/grpc/blob/master/doc/health-checking.md>`_ for more information.
	ServiceName string `json:"service_name,omitempty"`
	// The value of the :authority header in the gRPC health check request. If
	// left empty (default value), the name of the cluster this health check is associated
	// with will be used. The authority header can be customized for a specific endpoint by setting
	// the HealthCheckConfig.hostname field.
	Authority string `json:"authority,omitempty"`
}

type HcHandler

type HcHandler struct {
	// contains filtered or unexported fields
}

func NewHcHandler

func NewHcHandler(cnf *config.HealthCheckConfig) *HcHandler

func (*HcHandler) DisableEntryIp

func (h *HcHandler) DisableEntryIp(fqdn, ip string)

func (*HcHandler) EnableEntryIp

func (h *HcHandler) EnableEntryIp(fqdn, ip string)

func (*HcHandler) ServeHTTP

func (h *HcHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type HealthChecker

type HealthChecker interface {
	Check(host string) error
}

func MakeHealthCheck

func MakeHealthCheck(hcDef *hcconf.HealthCheck, fqdn string) HealthChecker

type HttpHealthCheck

type HttpHealthCheck struct {
	// contains filtered or unexported fields
}

func NewHttpHealthCheck

func NewHttpHealthCheck(httpHcConf *hcconf.HttpHealthCheck, timeout time.Duration, tlsEnabled bool, tlsConf *tls.Config) *HttpHealthCheck

func (*HttpHealthCheck) Check

func (h *HttpHealthCheck) Check(host string) error

type NoHealthCheck

type NoHealthCheck struct {
}

func NewNoHealthCheck

func NewNoHealthCheck() *NoHealthCheck

func (*NoHealthCheck) Check

func (h *NoHealthCheck) Check(host string) error

type TcpHealthCheck

type TcpHealthCheck struct {
	// contains filtered or unexported fields
}

func NewTcpHealthCheck

func NewTcpHealthCheck(hcConf *hcconf.TcpHealthCheck, timeout time.Duration, tlsEnabled bool, tlsConf *tls.Config) *TcpHealthCheck

func (*TcpHealthCheck) Check

func (h *TcpHealthCheck) Check(host string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL