retry

package
v0.0.0-...-8fc2537 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExponentialBackOff

func NewExponentialBackOff(timeout time.Duration) backoff.BackOff

NewExponentialBackOff creates a new backoff interval with the specified timeout

func NewUnlimitedExponentialBackOff

func NewUnlimitedExponentialBackOff() *backoff.ExponentialBackOff

NewUnlimitedExponentialBackOff returns a backoff interval without time restriction

func WithInterval

func WithInterval(ctx context.Context, interval backoff.BackOff, fn func() error) error

WithInterval retries the specified operation fn using the specified backoff interval. classify specifies the error classifier that can create circuit-breakers for specific error conditions. classify should return backoff.PermanentError if the error should not be retried and returned directly. Returns nil on success or the last received error upon exhausting the interval.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL