Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecutionHandlerFunc ¶
type RetryExecutor ¶
type RetryExecutor struct {
// The context
Context context.Context
// The amount of retries to perform.
MaxRetries int
// Number of milliseconds to sleep between retries.
RetriesIntervalMilliSecs int
// Message to display when retrying.
ErrorMessage string
// Prefix to print at the beginning of each log.
LogMsgPrefix string
// ExecutionHandler is the operation to run with retries.
ExecutionHandler ExecutionHandlerFunc
}
func (*RetryExecutor) Execute ¶
func (runner *RetryExecutor) Execute() error
func (*RetryExecutor) LogRetry ¶
func (runner *RetryExecutor) LogRetry(attemptNumber int, err error)
type TimeoutError ¶
type TimeoutError struct {
// contains filtered or unexported fields
}
Error of this type will be returned if the executor reaches timeout and no other error is returned by the execution handler.
func (TimeoutError) Error ¶
func (retryErr TimeoutError) Error() string
Click to show internal directories.
Click to hide internal directories.