Documentation ¶
Overview ¶
Package collector defines the collector component.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NoneModule ¶
NoneModule return a None optional type for Component.
This helper allows code that needs a disabled Optional type for the collector to get it. The helper is split from the implementation to avoid linking with the implementation.
Types ¶
type Component ¶
type Component interface { // RunCheck sends a Check in the execution queue RunCheck(inner check.Check) (checkid.ID, error) // StopCheck halts a check and remove the instance StopCheck(id checkid.ID) error // MapOverChecks call the callback with the list of checks locked. MapOverChecks(cb func([]check.Info)) // GetChecks copies checks GetChecks() []check.Check // GetAllInstanceIDs returns the ID's of all instances of a check GetAllInstanceIDs(checkName string) []checkid.ID // ReloadAllCheckInstances completely restarts a check with a new configuration and returns a list of killed check IDs ReloadAllCheckInstances(name string, newInstances []check.Check) ([]checkid.ID, error) // AddEventReceiver adds a callback to the collector to be called each time a check is added or removed. AddEventReceiver(cb EventReceiver) }
Component is the component type.
type EventReceiver ¶
EventReceiver represents a function to receive notification from the collector when running or stopping checks.
Directories ¶
Path | Synopsis |
---|---|
Package collectorimpl provides the implementation of the collector component.
|
Package collectorimpl provides the implementation of the collector component. |
Click to show internal directories.
Click to hide internal directories.