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

retry

package
v0.42.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RetryConfig

type RetryConfig struct {
	MaxAttempts  uint          // 0 means no limit (which is also the default).
	InitialDelay time.Duration // Default is 1 second.
	MaxDelay     time.Duration // Default is 60 seconds. 0 means no limit.
}

type Retryer

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

func NewRetryer

func NewRetryer(ctx context.Context, config RetryConfig) *Retryer

func (*Retryer) ShouldWaitAndRetry

func (r *Retryer) ShouldWaitAndRetry(ctx context.Context, err error) bool

Jump to

Keyboard shortcuts

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