condition

package
v1.74.13 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

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

Checker wraps a condition function as a checker.Checker implementation.

func NewChecker

func NewChecker(condition Condition, reason string) *Checker

NewChecker creates a condition checker.

func (*Checker) Check

func (c *Checker) Check() checker.Result

Check evaluates the condition function and returns the result. Reason is always empty - condition functions don't provide reasons.

type Condition

type Condition func() bool

Condition is a function that evaluates a boolean condition. Examples:

  • Bootstrap ready check
  • Leader election status
  • External dependency availability
  • Feature flag evaluation

Jump to

Keyboard shortcuts

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