try

package
v0.0.0-...-110d06e Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxRetries = 3

MaxRetries is the maximum number of retries before bailing.

Functions

func Do

func Do(fn func(attempt int) (retry bool, err error)) error

Do keeps trying the function until the second argument returns false, or no error is returned.

func IsMaxRetries

func IsMaxRetries(err error) bool

IsMaxRetries checks whether the error is due to hitting the maximum number of retries or not.

Types

This section is empty.

Jump to

Keyboard shortcuts

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