retry

package
v0.19.767 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsNonRetryable

func AsNonRetryable(err error) error

func IsNonRetryable

func IsNonRetryable(err error) bool

func New

func New(opts ...retryOpt) (*retryer, error)

func Retry

func Retry(ctx context.Context, fn RetryFn, opts ...retryOpt) error

func WithCBHook

func WithCBHook(cb RetryCBHook) retryOpt

func WithMaxAttempts

func WithMaxAttempts(maxAttempts int) retryOpt

func WithSleep

func WithSleep(sleep time.Duration) retryOpt

func WithTimeout

func WithTimeout(val time.Duration) retryOpt

Types

type RetryCBHook

type RetryCBHook func(context.Context, int) error

retry cb is used to expose a callback hook to users, useful for printing output and more.

type RetryFn

type RetryFn func(context.Context) error

Jump to

Keyboard shortcuts

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