Go API Documentation

github.com/TykTechnologies/tyk-pump/retry

No package summary is available.

Package

Files: 2. Third party imports: 2. Imports from organisation: 0. Tests: 0. Benchmarks: 0.

Types

BackoffHTTPRetry

This type doesn't have documentation.

Field name Field type Comment
logger

*logrus.Entry

No comment on field.
httpclient

*http.Client

No comment on field.
errMsg

string

No comment on field.
maxRetries

uint64

No comment on field.

conError, tempError, timeoutError

This type doesn't have documentation.

Field name Field type Comment
type

any

No comment on field.
type

any

No comment on field.
type

any

No comment on field.

Functions

func GetTemporalStorageExponentialBackoff

Uses: time.Second.

func NewBackoffRetry

NewBackoffRetry Creates an exponential backoff retry to use httpClient for connections. Will retry if a temporary error or 5xx or 429 status code in response.

func (*BackoffHTTPRetry) Send

Uses: bytes.NewBuffer, fmt.Errorf, http.StatusInternalServerError, http.StatusOK, http.StatusTooManyRequests, io.Copy, io.Discard, io.NopCloser, io.ReadAll, time.Duration, time.Now, time.Since.

Private functions

func isErrorRetryable

References: errors.As, errors.Unwrap, net.OpError, strings.Contains, strings.EqualFold, url.Error.

func handleErr