Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckLogger ¶
CheckLogger is the object responsible for logging the information generated during the running of the check
func (*CheckLogger) CheckFinished ¶
func (cl *CheckLogger) CheckFinished()
CheckFinished is used to log that the check has completed
func (*CheckLogger) CheckStarted ¶
func (cl *CheckLogger) CheckStarted()
CheckStarted is used to log that the check is about to run
func (*CheckLogger) Debug ¶
func (cl *CheckLogger) Debug(message string)
Debug is used to log a message for a check that may be useful in debugging
func (*CheckLogger) Error ¶
func (cl *CheckLogger) Error(checkErr error)
Error is used to log an error that occurred during the invocation of the check
type UtilizationTracker ¶
type UtilizationTracker interface { // Start activates the polling ticker for collection of data. Start() error // Stop is invoked when a worker is about to exit to remove the instance's // expvars. Stop() error // CheckStarted starts tracking the start time of a check. CheckStarted(bool) // CheckFinished ends tracking the the runtime of a check previously registered // with `CheckStarted()`. CheckFinished() // IsRunningLongCheck returns true if we are currently running a check // that is meant to be of indefinite duration (e.g. jmxfetch checks). IsRunningLongCheck() bool }
UtilizationTracker is the interface that encapsulates the API around the utilizationTracker object.
func NewUtilizationTracker ¶
func NewUtilizationTracker( workerName string, windowSize time.Duration, pollingInterval time.Duration, ) (UtilizationTracker, error)
NewUtilizationTracker instantiates and configures a utilization tracker that calculates the values and publishes them to expvars
type Worker ¶
Worker is an object that encapsulates the logic to manage a loop of processing checks over the provided `PendingCheckChan`