Documentation
¶
Index ¶
- func Bool(expected bool, timeout, interval time.Duration, fn func() bool) bool
- func BoolCtx(ctx context.Context, expected bool, timeout, interval time.Duration, ...) bool
- func BoolNoError(expected bool, timeout, interval time.Duration, fn func() (bool, error)) (bool, error)
- func BoolNoErrorCtx(ctx context.Context, expected bool, timeout, interval time.Duration, ...) (bool, error)
- func False(timeout, interval time.Duration, fn func() bool) bool
- func FalseCtx(ctx context.Context, timeout, interval time.Duration, fn func() bool) bool
- func FalseNoError(timeout, interval time.Duration, fn func() (bool, error)) (bool, error)
- func FalseNoErrorCtx(ctx context.Context, timeout, interval time.Duration, fn func() (bool, error)) (bool, error)
- func True(timeout, interval time.Duration, fn func() bool) bool
- func TrueCtx(ctx context.Context, timeout, interval time.Duration, fn func() bool) bool
- func TrueNoError(timeout, interval time.Duration, fn func() (bool, error)) (bool, error)
- func TrueNoErrorCtx(ctx context.Context, timeout, interval time.Duration, fn func() (bool, error)) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
Bool waits for fn() to return the specified expected result (either true or false) within a defined timeout period, checking at each interval.
func BoolCtx ¶
func BoolCtx(ctx context.Context, expected bool, timeout, interval time.Duration, fn func() bool) bool
Boolctx waits for fn() to return the specified expected result (either true or false) while context (with timeout if timeout > 0) is not done or canceled, checking at each interval.
func BoolNoError ¶
func BoolNoError(expected bool, timeout, interval time.Duration, fn func() (bool, error)) (bool, error)
BoolNoError waits for fn() to return the specified expected result (either true or false) without error within a defined timeout period, checking at each interval.
returns: false, err: on first fn() with non nil error true, nil: on first fn() that returns true, nil false, nil: when timeout is reached
func BoolNoErrorCtx ¶
func BoolNoErrorCtx(ctx context.Context, expected bool, timeout, interval time.Duration, fn func() (bool, error)) (bool, error)
BoolNoErrorCtx waits for fn() to return the specified expected result (either true or false) without error while context (with timeout if timeout > 0) is not done checking at each interval.
returns: false, err: on first fn() with non nil error true, nil: on first fn() that returns true, nil false, nil: when context is done
func False ¶
False waits for fn() to return false within a defined timeout period, checking at each interval.
func FalseCtx ¶
FalseCtx waits for fn() to return false while context (with timeout if timeout > 0) is not done or canceled, checking at each interval.
func FalseNoError ¶
FalseNoError is BoolNoError with expected value false
func FalseNoErrorCtx ¶
func FalseNoErrorCtx(ctx context.Context, timeout, interval time.Duration, fn func() (bool, error)) (bool, error)
FalseNoErrorCtx is BoolNoErrorCtx with expected value false
func True ¶
True waits for fn() to return true within a defined timeout period, checking at each interval.
func TrueCtx ¶
TrueCtx waits for fn() to return true while context (with timeout if timeout > 0) is not done or canceled, checking at each interval.
func TrueNoError ¶
TrueNoError is BoolNoError with expected value true
Types ¶
This section is empty.