retry

package
v0.0.0-...-e0772cd Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InvokeWithRetry

func InvokeWithRetry(config RetryConfig, f RetriableFunc) error

Types

type RetriableFunc

type RetriableFunc func(arg RetryFuncArg) error

type RetryConfig

type RetryConfig struct {
	Count int
	Sleep time.Duration
}

type RetryFuncArg

type RetryFuncArg struct {
	// Total retries to be executed
	Total int

	// Current try count starting with 1
	Current int
}

Jump to

Keyboard shortcuts

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