Help us shape the future of Go! Take the 2026 Go Developer Survey

retry

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const Stop time.Duration = -1

Variables

This section is empty.

Functions

This section is empty.

Types

type FixedStrategyRetry

type FixedStrategyRetry struct {
	// contains filtered or unexported fields
}

func (*FixedStrategyRetry) NextDelay

func (r *FixedStrategyRetry) NextDelay(attempts int) time.Duration

type Option

type Option func(Retry)

func WithFixedDelay

func WithFixedDelay(fixedDelaySeconds []int64) Option

type Retry

type Retry interface {
	NextDelay(attempts int) time.Duration
}

func NewRetry

func NewRetry(strategy Strategy, opts ...Option) Retry

type Strategy

type Strategy string
const (
	FixedStrategy   Strategy = "fixed"
	BackoffStrategy Strategy = "backoff"
)

Jump to

Keyboard shortcuts

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