Documentation
¶
Overview ¶
Copyright (c) Microsoft Corporation. Licensed under the MIT License.
Copyright (c) Microsoft Corporation. Licensed under the MIT License.
Copyright (c) Microsoft Corporation. Licensed under the MIT License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExponentialBackoff ¶
type ExponentialBackoff struct {
// MaxAttempts sets the maximum number of attempts. The default value of 0
// indicates unlimited attempts; setting this to 1 will disable retries.
MaxAttempts uint64
// MinInterval is the maximum interval between retries (before jitter).
// Will be set to a default of 1/8s if unspecified.
MinInterval time.Duration
// MaxInterval is the maximum interval between retries (before jitter).
// Will be set to a default of one minute if unspecified.
MaxInterval time.Duration
// Timeout is the total timeout for all retries.
Timeout time.Duration
// NoJitter removes the default jitter.
NoJitter bool
// Logger provides a logger which will be used to log retry attempts and
// results.
Logger *slog.Logger
}
ExponentialBackoff implements a retry policy with exponential backoff and optional jitter.
Click to show internal directories.
Click to hide internal directories.