healthcheck

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterHealthcheck

func RegisterHealthcheck(name string, f func(Healthcheck) (HealthChecker, error))

func TLSHealthCheck added in v0.1.0

func TLSHealthCheck(h TcpHealthCheck) bool

Types

type CanBeHealthy

type CanBeHealthy interface {
	IsHealthy() bool
	GetListener() <-chan bool
	CanPassYet() bool
}

type CommandHealthCheck added in v0.1.0

type CommandHealthCheck struct {
	Destination string
	Command     string
}

func (CommandHealthCheck) Healthcheck added in v0.1.0

func (h CommandHealthCheck) Healthcheck() bool

type HealthChecker

type HealthChecker interface {
	Healthcheck() bool
}

func CommandConstructor added in v0.1.0

func CommandConstructor(h Healthcheck) (HealthChecker, error)

func PingConstructor

func PingConstructor(h Healthcheck) (HealthChecker, error)

func TcpConstructor

func TcpConstructor(h Healthcheck) (HealthChecker, error)

type Healthcheck

type Healthcheck struct {
	Type        string `yaml:"type"`
	Destination string `yaml:"destination"`

	Rise    uint              `yaml:"rise"`
	Fall    uint              `yaml:"fall"`
	Every   uint              `yaml:"every"`
	History []bool            `yaml:"-"`
	Config  map[string]string `yaml:"config"`
	// contains filtered or unexported fields
}

func (*Healthcheck) CanPassYet

func (h *Healthcheck) CanPassYet() bool

func (Healthcheck) GetHealthChecker

func (h Healthcheck) GetHealthChecker() (HealthChecker, error)

func (*Healthcheck) GetListener

func (h *Healthcheck) GetListener() <-chan bool

func (Healthcheck) IsHealthy

func (h Healthcheck) IsHealthy() bool

func (Healthcheck) IsRunning

func (h Healthcheck) IsRunning() bool

func (*Healthcheck) NewWithDestination added in v0.0.7

func (h *Healthcheck) NewWithDestination(destination string) (*Healthcheck, error)

func (*Healthcheck) PerformHealthcheck

func (h *Healthcheck) PerformHealthcheck()

func (*Healthcheck) Run

func (h *Healthcheck) Run(debug bool)

func (*Healthcheck) Setup

func (h *Healthcheck) Setup() error

func (*Healthcheck) Stop

func (h *Healthcheck) Stop()

func (*Healthcheck) Validate

func (h *Healthcheck) Validate(name string, remote bool) error

type PingHealthCheck

type PingHealthCheck struct {
	Destination string
}

func (PingHealthCheck) Healthcheck

func (h PingHealthCheck) Healthcheck() bool

type TcpHealthCheck

type TcpHealthCheck struct {
	Destination string
	Port        string
	Send        string
	Expect      string
	TLS         bool

	SkipVerify bool
	ServerName string
	// contains filtered or unexported fields
}

func (TcpHealthCheck) Healthcheck

func (h TcpHealthCheck) Healthcheck() bool

func (TcpHealthCheck) VerifyResponse added in v0.1.0

func (h TcpHealthCheck) VerifyResponse(answer string, contextLogger *log.Entry) bool

Jump to

Keyboard shortcuts

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