Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IsRetryable ¶
IsRetryable checks the error is safe or worth to retry, eg. "context.Canceled" better not retry
type Option ¶
type Option func(*retryOptions)
Option ...
func WithBackoffBaseDelay ¶
WithBackoffBaseDelay configures the initial delay, if delayInMs <= 0 "defaultBackoffBaseInMs" will be used
func WithBackoffMaxDelay ¶
WithBackoffMaxDelay configures the maximum delay, if delayInMs <= 0 "defaultBackoffCapInMs" will be used
func WithInfiniteTries ¶
func WithInfiniteTries() Option
WithInfiniteTries configures to retry forever (math.MaxInt64 times) till success or got canceled
func WithIsRetryableErr ¶
func WithIsRetryableErr(f IsRetryable) Option
WithIsRetryableErr configures the error should retry or not, if not set, retry by default
func WithMaxTries ¶
WithMaxTries configures maximum tries, if tries <= 0 "defaultMaxTries" will be used
Click to show internal directories.
Click to hide internal directories.