probe

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

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

Go to latest
Published: May 17, 2019 License: LGPL-3.0 Imports: 11 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 GetShellHealth

func GetShellHealth(address string) map[string]string

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 *service.HealthStatus
	Ctx          context.Context
	Cancel       context.CancelFunc
	TimeInterval int
	HostNode     *client.HostNode
	MaxErrorsNum int
}

func (*HttpProbe) Check

func (h *HttpProbe) Check()

Check check

func (*HttpProbe) HTTPCheck

func (h *HttpProbe) HTTPCheck()

HTTPCheck http check

func (*HttpProbe) Stop

func (h *HttpProbe) Stop()

Stop stop

type Probe

type Probe interface {
	Check()
	Stop()
}

Probe probe

func CreateProbe

func CreateProbe(ctx context.Context, hostNode *client.HostNode, statusChan chan *service.HealthStatus, v *service.Service) Probe

CreateProbe create probe

type ShellProbe

type ShellProbe struct {
	Name         string
	Address      string
	ResultsChan  chan *service.HealthStatus
	Ctx          context.Context
	Cancel       context.CancelFunc
	TimeInterval int
	HostNode     *client.HostNode
	MaxErrorsNum int
}

func (*ShellProbe) Check

func (h *ShellProbe) Check()

func (*ShellProbe) ShellCheck

func (h *ShellProbe) ShellCheck()

func (*ShellProbe) Stop

func (h *ShellProbe) Stop()

type TcpProbe

type TcpProbe struct {
	Name         string
	Address      string
	ResultsChan  chan *service.HealthStatus
	Ctx          context.Context
	Cancel       context.CancelFunc
	TimeInterval int
	HostNode     *client.HostNode
	MaxErrorsNum int
}

func (*TcpProbe) Check

func (h *TcpProbe) Check()

func (*TcpProbe) Stop

func (h *TcpProbe) Stop()

func (*TcpProbe) TcpCheck

func (h *TcpProbe) TcpCheck()

Jump to

Keyboard shortcuts

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