Documentation ¶
Index ¶
Constants ¶
View Source
const ( RetryAttempts = 4 RetryDelay = 2 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func TryWithAttempts ¶
TryWithAttempts tries to get non-error result of calling function f with delay.
func TryWithAttemptsCtx ¶
func TryWithAttemptsCtx(ctx context.Context, f func(context.Context) error, attempts uint, delay time.Duration) (err error)
TryWithAttemptsCtx is helper function that calls TryWithAttempts with function f transformed to closure that does not require ctx as necessary argument.
Types ¶
Click to show internal directories.
Click to hide internal directories.