retry

package
v0.1.83 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoMoreRetry = errors.New("no more retry")

ErrNoMoreRetry is a sentinel error indicating that no more retries should be performed.

Functions

func Do

func Do(fn func() error, attempts int, delay time.Duration) error

Do executes fn repeatedly until it succeeds, the attempts are exhausted, or fn returns an error that indicates no more retries.

func IsNoMoreRetry

func IsNoMoreRetry(err error) bool

IsNoMoreRetry reports whether the given error indicates to stop retrying.

func StopRetry added in v0.1.81

func StopRetry(msg string) error

StopRetry creates a wrapped error indicating that retries should stop.

Types

This section is empty.

Jump to

Keyboard shortcuts

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