runner

package
v0.0.0-...-45a9bcf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 13 Imported by: 8

Documentation

Index

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, haAgent haagent.Component) *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) GetChan

func (r *Runner) GetChan() chan<- check.Check

GetChan returns a write-only version of the pending channel

func (*Runner) SetScheduler

func (r *Runner) SetScheduler(s *scheduler.Scheduler)

SetScheduler sets the scheduler for the runner

func (*Runner) ShouldAddCheckStats added in v0.9.0

func (r *Runner) ShouldAddCheckStats(id checkid.ID) bool

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

func (r *Runner) StopCheck(id checkid.ID) error

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

func (r *Runner) UpdateNumWorkers(numChecks int64)

UpdateNumWorkers checks if the current number of workers is reasonable, and adds more if needed

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL