Documentation ¶
Index ¶
- type Runner
- func (r *Runner) AddWorker()
- func (r *Runner) GetChan() chan<- check.Check
- func (r *Runner) SetScheduler(s *scheduler.Scheduler)
- func (r *Runner) ShouldAddCheckStats(id checkid.ID) bool
- func (r *Runner) Stop()
- func (r *Runner) StopCheck(id checkid.ID) error
- func (r *Runner) UpdateNumWorkers(numChecks int64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner is the object in charge of running all the checks
func NewRunner ¶
func NewRunner(senderManager sender.SenderManager) *Runner
NewRunner takes the number of desired goroutines processing incoming checks.
func (*Runner) AddWorker ¶
func (r *Runner) AddWorker()
AddWorker adds a single worker to the runner.
func (*Runner) SetScheduler ¶
SetScheduler sets the scheduler for the runner
func (*Runner) ShouldAddCheckStats ¶ added in v0.9.0
ShouldAddCheckStats returns true if check stats should be preserved or not
func (*Runner) Stop ¶
func (r *Runner) Stop()
Stop closes the pending channel so all workers will exit their loop and terminate All publishers to the pending channel need to have stopped before Stop is called
func (*Runner) StopCheck ¶
StopCheck invokes the `Stop` method on a check if it's running. If the check is not running, this is a noop
func (*Runner) UpdateNumWorkers ¶
UpdateNumWorkers checks if the current number of workers is reasonable, and adds more if needed