Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // LongerOpts gives a longer timeout than default to for gitiles quota // issues (~5 minutes). LongerOpts = Options{BaseDelay: 5 * time.Second, BackoffBase: 2.0, Retries: 5} // DefaultOpts is the default timeout (~30 seconds). DefaultOpts = Options{BaseDelay: time.Second, BackoffBase: 2.0, Retries: 5} )
Functions ¶
func DoWithRetry ¶
DoWithRetry executes function doFunc. If there is an error, it will retry with a backoff delay until max retry times reached or context done. If retryOpts.Retries == 0, it will execute doFunc just once without any retries. If retryOpts.Retries < 0, it retries an infinite number of times.
Types ¶
Click to show internal directories.
Click to hide internal directories.