Documentation ¶
Index ¶
- func RegisterHealthcheck(name string, f func(Healthcheck) (HealthChecker, error))
- type CanBeHealthy
- type HealthChecker
- type Healthcheck
- func (h *Healthcheck) CanPassYet() bool
- func (h *Healthcheck) ChangeDestination(newDestination string) error
- func (h *Healthcheck) Default(instancemetadata.InstanceMetadata)
- func (h Healthcheck) GetHealthChecker() (HealthChecker, error)
- func (h *Healthcheck) GetListener() <-chan bool
- func (h Healthcheck) IsHealthy() bool
- func (h Healthcheck) IsRunning() bool
- func (h *Healthcheck) PerformHealthcheck()
- func (h *Healthcheck) Run(debug bool)
- func (h *Healthcheck) Setup() error
- func (h *Healthcheck) Stop()
- func (h Healthcheck) Validate(name string, remote bool) error
- type PingHealthCheck
- type TcpHealthCheck
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 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 (h *Healthcheck) Default(instancemetadata.InstanceMetadata)
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()
type PingHealthCheck ¶
type PingHealthCheck struct {
Destination string
}
func (PingHealthCheck) Healthcheck ¶
func (h PingHealthCheck) Healthcheck() bool
type TcpHealthCheck ¶
func (TcpHealthCheck) Healthcheck ¶
func (h TcpHealthCheck) Healthcheck() bool
Click to show internal directories.
Click to hide internal directories.