utils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteWithTimeout

func ExecuteWithTimeout(action func() bool, timeout time.Duration, interval time.Duration) error

ExecuteWithTimeout takes a function and invokes it, if the function returns false then it will retry it after sleeping interval seconds, until it returns true or timeout

func RetryWithMaxAttempts

func RetryWithMaxAttempts(action func() error, attempts int, interval time.Duration) error

RetryWithMaxAttempts keeps invoking the passed function until maximum attempts is reached or the function returns no error

Types

This section is empty.

Jump to

Keyboard shortcuts

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