Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultBackoff = LinearBackoff(100 * time.Millisecond) //nolint:mnd
Functions ¶
func New ¶
func New(opts ...Option) jet.Middleware
Types ¶
type AllowFunc ¶
var DefaultAllow AllowFunc = func(err error) bool { return jet.IsHTTPTransporterServerError(err) && errors.Is(err, timeout.ErrTimeout) }
func OrAllowFuncs ¶
type BackoffFunc ¶
func ConstantBackoff ¶
func ConstantBackoff(delay time.Duration) BackoffFunc
ConstantBackoff returns a backoff function that always returns the same delay.
func ExponentialBackoff ¶
func ExponentialBackoff(delay time.Duration) BackoffFunc
ExponentialBackoff returns a backoff function that increases the delay exponentially.
func LinearBackoff ¶
func LinearBackoff(delay time.Duration) BackoffFunc
LinearBackoff returns a backoff function that increases the delay linearly.
func NoBackoff ¶
func NoBackoff() BackoffFunc
Click to show internal directories.
Click to hide internal directories.