Documentation ¶
Index ¶
- func RegisterHealthcheck(name string, f func(Healthcheck) (HealthChecker, error))
- func TLSHealthCheck(h TcpHealthCheck) bool
- type CanBeHealthy
- type CommandHealthCheck
- type HealthChecker
- type Healthcheck
- func (h *Healthcheck) CanPassYet() bool
- 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) NewWithDestination(destination string) (*Healthcheck, error)
- 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))
func TLSHealthCheck ¶ added in v0.1.0
func TLSHealthCheck(h TcpHealthCheck) bool
Types ¶
type CanBeHealthy ¶
type CommandHealthCheck ¶ added in v0.1.0
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]interface{} `yaml:"config"` RunOnHealthy []string `yaml:"run_on_healthy"` RunOnUnhealthy []string `yaml:"run_on_unhealthy"` // 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()
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
Click to show internal directories.
Click to hide internal directories.