retry

package
v0.4.17 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(ctx context.Context, op Operation) error

func HTTPStatusCode

func HTTPStatusCode(err error) int

Types

type Operation

type Operation struct {
	MaxAttempts    int           // default: 3. use negative for infinity
	InitialDelay   time.Duration // default: time.Second
	MaxDelay       time.Duration // default: 30 * time.Second
	Description    string
	FailureCounter prometheus.Counter
	Func           func() error
}

Jump to

Keyboard shortcuts

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