probe

package
v5.1.10-release+incomp... Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPProbe

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

HTTPProbe probes through the http protocol

func (*HTTPProbe) Check

func (h *HTTPProbe) Check()

Check starts http probe.

func (*HTTPProbe) GetHTTPHealth

func (h *HTTPProbe) GetHTTPHealth() map[string]string

GetHTTPHealth get http health

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
	TimeoutSecond int
	TimeInterval  int
	MaxErrorsNum  int
}

TCPProbe probes through the tcp protocol

func (*TCPProbe) Check

func (h *TCPProbe) Check()

Check starts tcp probe.

func (*TCPProbe) GetTCPHealth

func (h *TCPProbe) GetTCPHealth() map[string]string

GetTCPHealth get tcp health

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