tracker

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RunningChecksTracker

type RunningChecksTracker struct {
	// contains filtered or unexported fields
}

RunningChecksTracker is an object that keeps a thread-safe track of all the running checks

func NewRunningChecksTracker

func NewRunningChecksTracker() *RunningChecksTracker

NewRunningChecksTracker is a contructor for a RunningChecksTracker

func (*RunningChecksTracker) AddCheck

func (t *RunningChecksTracker) AddCheck(check check.Check) bool

AddCheck adds a check to the list of running checks if the check isn't already added. Method returns a boolean if the addition was successful.

func (*RunningChecksTracker) Check

func (t *RunningChecksTracker) Check(id checkid.ID) (check.Check, bool)

Check returns a check in the running check list, if it can be found

func (*RunningChecksTracker) DeleteCheck

func (t *RunningChecksTracker) DeleteCheck(id checkid.ID)

DeleteCheck removes a check from the list of running checks

func (*RunningChecksTracker) RunningChecks

func (t *RunningChecksTracker) RunningChecks() map[checkid.ID]check.Check

RunningChecks returns a list of all the running checks

func (*RunningChecksTracker) WithCheck

func (t *RunningChecksTracker) WithCheck(id checkid.ID, closureFunc withCheckFunc) bool

WithCheck takes in a function to execute in the context of a locked state of the checks tracker on a single check

func (*RunningChecksTracker) WithRunningChecks

func (t *RunningChecksTracker) WithRunningChecks(closureFunc withRunningChecksFunc)

WithRunningChecks takes in a function to execute in the context of a locked state of the checks tracker

Jump to

Keyboard shortcuts

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