Documentation
¶
Overview ¶
Package retry runs operations with bounded exponential backoff.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Do ¶
func Do(ctx context.Context, op func() error, retryable func(error) bool, attempts int, initial time.Duration) error
Do runs op until it returns nil, retryable returns false, the attempt budget is exhausted, or ctx is done. Backoff doubles each attempt. attempts counts total attempts including the first, so attempts=1 means no retry. Callers bound total wait time with context deadlines.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.