try

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(
	tries int,
	delay time.Duration,
	fn func(try int) error,
) (err error)

func DoWithContextTimeout

func DoWithContextTimeout(
	parent context.Context,
	tries int,
	delay time.Duration,
	timeout time.Duration,
	fn func(ctx context.Context, try int) error,
) (err error)

func DoWithResult

func DoWithResult[T interface{}](
	tries int,
	delay time.Duration,
	fn func(try int) (T, error),
) (result T, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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