Documentation ¶
Overview ¶
Package strategy provides strategies for use with retry
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Strategy ¶
type Strategy interface { //WaitDuration takes attempt, maxRetry and request/response paramaetrs as input and gives out a duration as response WaitDuration(attempt, maxRetry int, req *http.Request, resp *http.Response, err error) time.Duration }
Strategy is the interface requirement for any strategy implementation
func DefaultStrategy ¶
DefaultStrategy provides implementation for Fixed duration wait
func ExponentialStrategy ¶
ExponentialStrategy provided implementation for exponentially (in powers of 2) growing wait duration
Click to show internal directories.
Click to hide internal directories.