Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(cfg Config) goresilience.Runner
New returns a new retry ready executor, the execution will be retried the number of times specificed on the config (+1, the original execution that is not a retry).
func NewMiddleware ¶
func NewMiddleware(cfg Config) goresilience.Middleware
NewMiddleware returns a new retry middleware, the execution will be retried the number of times specificed on the config (+1, the original execution that is not a retry).
Types ¶
type Config ¶
type Config struct { // WaitBase is the base unit duration to wait on the retries. WaitBase time.Duration // Backoff enables exponential backoff on the retry (also disables jitter). DisableBackoff bool // Times is the number of times that will be retried in case of error // before returning the error itself. Times int }
Config is the configuration used for the retry Runner.
Click to show internal directories.
Click to hide internal directories.