healthtest

package
v3.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HealthTesterMap = map[string]healthTesterBuilder{
	"tcp":      newTcpHealthTester,
	"ntp":      newNtpHealthTester,
	"exec":     newExecHealthTester,
	"file":     newFileHealthTester,
	"nodeping": newNodepingHealthTester,
	"pingdom":  newPingdomHealthTester,
}
View Source
var (
	Qtypes = []uint16{dns.TypeA, dns.TypeAAAA}
)
View Source
var TestRunner = &HealthTestRunner{
	entries: make(map[string]*HealthTestRunnerEntry),
}

Functions

This section is empty.

Types

type ExecHealthTester

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

func (*ExecHealthTester) String

func (t *ExecHealthTester) String() string

func (*ExecHealthTester) Test

func (t *ExecHealthTester) Test(ht *HealthTest) bool

type FileHealthTester

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

func (*FileHealthTester) String

func (t *FileHealthTester) String() string

func (*FileHealthTester) Test

func (t *FileHealthTester) Test(ht *HealthTest) bool

type HealthTest

type HealthTest struct {
	HealthTestParameters
	// contains filtered or unexported fields
}

func NewFromMap

func NewFromMap(i map[string]interface{}) (*HealthTest, error)

func NewTest

func NewTest(ipAddress net.IP, htp HealthTestParameters, tester *HealthTester) *HealthTest

func (*HealthTest) IP

func (ht *HealthTest) IP() net.IP

func (*HealthTest) IsHealthy

func (ht *HealthTest) IsHealthy() bool

func (*HealthTest) Stop

func (ht *HealthTest) Stop() (err error)

Stop the health check from running

func (*HealthTest) String

func (ht *HealthTest) String() string

Format the health test as a string - used to compare two tests and as an index for the hash

type HealthTestParameters

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

type HealthTestRunner

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

func (*HealthTestRunner) IsHealthy

func (htr *HealthTestRunner) IsHealthy(ht *HealthTest) bool

type HealthTestRunnerEntry

type HealthTestRunnerEntry struct {
	HealthTest
	// contains filtered or unexported fields
}

type HealthTester

type HealthTester interface {
	String() string
	Test(*HealthTest) bool
}

type NodepingHealthTester

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

func (*NodepingHealthTester) String

func (t *NodepingHealthTester) String() string

func (*NodepingHealthTester) Test

func (t *NodepingHealthTester) Test(ht *HealthTest) bool

type NtpHealthTester

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

func (*NtpHealthTester) String

func (t *NtpHealthTester) String() string

func (*NtpHealthTester) Test

func (t *NtpHealthTester) Test(ht *HealthTest) bool

type PingdomHealthTester

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

func (*PingdomHealthTester) String

func (t *PingdomHealthTester) String() string

func (*PingdomHealthTester) Test

func (t *PingdomHealthTester) Test(ht *HealthTest) bool

type TcpHealthTester

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

func (*TcpHealthTester) String

func (t *TcpHealthTester) String() string

func (*TcpHealthTester) Test

func (t *TcpHealthTester) Test(ht *HealthTest) bool

Jump to

Keyboard shortcuts

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