Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Poll ¶
func Poll(fn PollFunc, opts PollOptions) error
Poll executes the given function `fn` until it returns no error, or until the configured number of tries or timeout is reached.
Types ¶
type PollFunc ¶
type PollFunc func() error
PollFunc is the function to be executed by the Poll function. It should return an error to indicate a failure and that it should be retried. A nil error indicates success.
type PollOptions ¶
type PollOptions struct {
// Tries is the maximum number of times to try the function.
// If Tries is 0, it will retry until Timeout is reached.
Tries int
// Delay is the time to wait between retries.
// If Delay is 0, binary exponential backoff is used, starting at 2 seconds.
Delay time.Duration
// Timeout is the maximum total time to spend retrying.
// If Timeout is 0, there is no time limit.
Timeout time.Duration
}
PollOptions configures the behavior of the Poll function.
type Step ¶
type Step struct {
PreRun func(TestContext) error
Run func(TestContext) error
PostRun func(TestContext) error
Verify func(TestContext) error
}
Compact acc runner
type TestContext ¶
type TestContext interface {
util.CmdContext
Org() string
OrgUrl() string
PAT() string
}
Click to show internal directories.
Click to hide internal directories.