retry

package
v0.3.27 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Retry

func Retry(ctx context.Context, fn func() error, attempts uint) (err error)

Retry attempts to execute the provided function up to 'attempts' times, respecting the context for cancellation and timeout

func RetryBackoff

func RetryBackoff(ctx context.Context, fn func() error, attempts uint, backoffStrategy *backoff.Backoff) (err error)

Retry attempts to execute the provided function up to 'attempts' times with an exponential backoff strategy, respecting the context for cancellation and timeout

Types

This section is empty.

Jump to

Keyboard shortcuts

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