Documentation ¶
Index ¶
- type RunningChecksTracker
- func (t *RunningChecksTracker) AddCheck(check check.Check) bool
- func (t *RunningChecksTracker) Check(id checkid.ID) (check.Check, bool)
- func (t *RunningChecksTracker) DeleteCheck(id checkid.ID)
- func (t *RunningChecksTracker) RunningChecks() map[checkid.ID]check.Check
- func (t *RunningChecksTracker) WithCheck(id checkid.ID, closureFunc withCheckFunc) bool
- func (t *RunningChecksTracker) WithRunningChecks(closureFunc withRunningChecksFunc)
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 ¶
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