fettle v1.0.0 Fettle.Runner View Source
Runs a health check periodically.
The start_link/4 function is called by the Fettle.RunnerSupervisor to start the server,
passing the check spec, and Checker module to run.
When a check is scheduled to run, the server spawns the check function in a separate, monitored process,
which will send the result back to the runner as a Fettle.Checker.Result.
The first check execution is scheduled after an initial delay (:initial_delay_ms), then the
check is scheduled to run :period_ms after completion of the previous check. i.e. the period
does not include the time it takes to actually run the check, just the time between completions
(or time-outs); effectively the period defines the maximum rate that a check will run.
If a timeout (:timeout_ms) occurs before a result is received, the check enters error status,
and the spawned checker process is killed by the Runner.
Results are forwarded to the Fettle.ScoreBoard process.
See also
Fettle.RunnerSupervisor- starts and supervisesRunnerprocesses.
Link to this section Summary
Functions
start the runner for the given check
Link to this section Types
runner state
Link to this section Functions
start_link( config :: Fettle.Config.t(), spec :: Fettle.Spec.t(), checker_init :: checker_init(), opts :: Keyword.t() ) :: GenServer.on_start()
start the runner for the given check.