probe

package
v5.1.3-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2019 License: LGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHTTPHealth

func GetHTTPHealth(address string) map[string]string

GetHTTPHealth get http health

func GetTCPHealth

func GetTCPHealth(address string) map[string]string

GetTCPHealth get tcp health

Types

type HTTPProbe

type HTTPProbe struct {
	Name         string
	Address      string
	ResultsChan  chan *v1.HealthStatus
	Ctx          context.Context
	Cancel       context.CancelFunc
	TimeInterval int
	MaxErrorsNum int
}

HTTPProbe probes through the http protocol

func (*HTTPProbe) Check

func (h *HTTPProbe) Check()

Check starts http probe.

func (*HTTPProbe) HTTPCheck

func (h *HTTPProbe) HTTPCheck()

HTTPCheck http check

func (*HTTPProbe) Stop

func (h *HTTPProbe) Stop()

Stop stops http probe.

type Probe

type Probe interface {
	Check()
	Stop()
}

Probe probe

func CreateProbe

func CreateProbe(ctx context.Context, statusChan chan *v1.HealthStatus, v *v1.Service) Probe

CreateProbe create probe

type TCPProbe

type TCPProbe struct {
	Name         string
	Address      string
	ResultsChan  chan *v1.HealthStatus
	Ctx          context.Context
	Cancel       context.CancelFunc
	TimeInterval int
	MaxErrorsNum int
}

TCPProbe probes through the tcp protocol

func (*TCPProbe) Check

func (h *TCPProbe) Check()

Check starts tcp probe.

func (*TCPProbe) Stop

func (h *TCPProbe) Stop()

Stop stops tcp probe.

func (*TCPProbe) TCPCheck

func (h *TCPProbe) TCPCheck()

TCPCheck -

Jump to

Keyboard shortcuts

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