Documentation ¶
Overview ¶
Package conditions provides a set of conditions which can be used to wait for some condition to be met.
Index ¶
- Constants
- Variables
- type AssertionFunc
- type Condition
- func None() Condition
- func PollingCondition(description string, assertion AssertionFunc, timeout, interval time.Duration) Condition
- func WaitForAll(conditions ...Condition) Condition
- func WaitForFileToExist(filename string) Condition
- func WaitForFilesToExist(filenames ...string) Condition
- func WaitForKubeconfigReady(filename string) Condition
Constants ¶
const OK = "OK"
OK is returned by the String method of the passed Condition.
Variables ¶
var ErrSkipAssertion = errors.New("SKIP")
ErrSkipAssertion is used as a return value from AssertionFunc to indicate that this assertion (and, by extension, condition, and check) is to be skipped. It is not returned as an error by any Condition's Wait method but recorded as description and returned by String method.
Functions ¶
This section is empty.
Types ¶
type AssertionFunc ¶
AssertionFunc is called every poll interval until it returns nil.
type Condition ¶
Condition is a object which Wait()s for some condition to become true.
Condition can describe itself via String() method.
func PollingCondition ¶
func PollingCondition(description string, assertion AssertionFunc, timeout, interval time.Duration) Condition
PollingCondition converts AssertionFunc into Condition by calling it every interval until timeout is reached.
func WaitForAll ¶
WaitForAll creates a condition which waits for all the conditions to be successful.
func WaitForFileToExist ¶
WaitForFileToExist is a service condition that will wait for the existence of a file.
func WaitForFilesToExist ¶
WaitForFilesToExist is a service condition that will wait for the existence of all the files.
func WaitForKubeconfigReady ¶
WaitForKubeconfigReady is a condition that will wait for the kubeconfig to be ready.