Documentation
¶
Index ¶
- Constants
- Variables
- func GenerateBytesUUID() []byte
- func GenerateUUID() string
- func NewProbabilisticRetryRunner(maxTimes int, interval int64, expBackoff bool) *retryRunner
- func NewRetryRunner(maxTimes int, delay time.Duration, expBackoff bool) *retryRunner
- func NewTypedRetryRunner[V any](maxTimes int, delay time.Duration, expBackoff bool) *typedRetryRunner[V]
- type RetryRunner
Constants ¶
View Source
const Infinitely = -1
Variables ¶
View Source
var ErrMaxRetriesExceeded = errors.New("maximum number of retries exceeded")
Functions ¶
func GenerateBytesUUID ¶
func GenerateBytesUUID() []byte
GenerateBytesUUID creates a new random UUID and returns it as []byte
func GenerateUUID ¶
func GenerateUUID() string
GenerateUUID creates a new random UUID and returns it as a string
func NewProbabilisticRetryRunner ¶
NewProbabilisticRetryRunner returns a new runner that sets delay to time.Duration(rand.Int63n(f.interval)+1) * time.Millisecond
func NewRetryRunner ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.