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

retry

package
v1.34.9 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultBackoff

func DefaultBackoff() backoff.BackOff

DefaultBackoff returns the default backoff.

func NewBackOff

func NewBackOff(conf *bo.Backoff) backoff.BackOff

NewBackOff constructs a new backoff with a config.

func Retry

func Retry(
	ctx context.Context,
	le *logrus.Entry,
	f func(ctx context.Context, success func()) error,
	bo backoff.BackOff,
) error

Retry uses a backoff to re-try a process. If the process returns nil or context canceled, it exits. If bo is nil, a default one is created. Success function will reset the backoff.

Types

This section is empty.

Jump to

Keyboard shortcuts

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