retry

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(cfg Config, operation string, fn func() error) error

Do executes fn with exponential backoff retry logic.

Types

type Config

type Config struct {
	MaxAttempts int
	InitialWait time.Duration
	MaxWait     time.Duration
}

Config holds retry configuration.

func Default

func Default() Config

Default returns the default retry configuration.

Jump to

Keyboard shortcuts

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