runner

package
v0.0.0-...-c4caace Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

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() *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

func (r *Runner) ShouldAddCheckStats(id check.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 check.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