Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckFunc ¶
type CheckFunc func(core.Target, config.HealthcheckConfig, chan<- CheckResult)
*
- Health Check function
- Returns channel in which only one check result will be delivered
type Healthcheck ¶
type Healthcheck struct { /* Input channel to accept targets */ In chan []core.Target /* Output channel to send check results for individual target */ Out chan CheckResult // contains filtered or unexported fields }
*
- Healthcheck
func New ¶
func New(strategy string, cfg config.HealthcheckConfig) *Healthcheck
*
- Create new Discovery based on strategy
func (*Healthcheck) UpdateWorkers ¶
func (this *Healthcheck) UpdateWorkers(targets []core.Target)
*
- Sync current workers to represent healtcheck on targets
- Will remove not needed workers, and add needed
type Worker ¶
type Worker struct { /* Last confirmed check result */ LastResult CheckResult // contains filtered or unexported fields }
*
- Healthcheck Worker
- Handles all periodic healthcheck logic
- and yields results on change
Click to show internal directories.
Click to hide internal directories.