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

GetShellHealth get shell 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 *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, error)

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
}

ShellProbe -

func (*ShellProbe) Check

func (h *ShellProbe) Check()

Check -

func (*ShellProbe) ShellCheck

func (h *ShellProbe) ShellCheck()

ShellCheck -

func (*ShellProbe) Stop

func (h *ShellProbe) Stop()

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()