retry

package
v1.106.8-rc.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RetryCancellationErr error = fmt.Errorf("RetryCancellationErr")

RetryCancellationErr is the error type that's returned if the retry is cancelled

Functions

func IsRetryCancelledError

func IsRetryCancelledError(err error) bool

IsRetryCancelledError returns true if the error was a cancellation

func Retry

func Retry[T any](ctx context.Context, f func() (T, error), attempts uint, delay time.Duration) (T, error)

Retry will run the f func until we receive a non error result up to the provided attempts or a cancellation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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