healthcheck

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2015 License: Apache-2.0 Imports: 8 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))

Types

type CanBeHealthy

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

type HealthChecker

type HealthChecker interface {
	Healthcheck() bool
}

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
	// contains filtered or unexported fields
}

func (*Healthcheck) CanPassYet

func (h *Healthcheck) CanPassYet() bool

func (*Healthcheck) ChangeDestination added in v0.0.2

func (h *Healthcheck) ChangeDestination(newDestination string) error

func (*Healthcheck) Default

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

func (TcpHealthCheck) Healthcheck

func (h TcpHealthCheck) Healthcheck() bool

Jump to

Keyboard shortcuts

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