Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for exponentialBackoffWait (0.17 sec)

  1. internal/rest/client.go

    	return fmt.Errorf("[%s] %w", c.lastErrTime.Format(time.RFC3339), c.lastErr)
    }
    
    // computes the exponential backoff duration according to
    // https://www.awsarchitectureblog.com/2015/03/backoff.html
    func exponentialBackoffWait(r *rand.Rand, unit, cap time.Duration) func(uint) time.Duration {
    	if unit > time.Hour {
    		// Protect against integer overflow
    		panic("unit cannot exceed one hour")
    	}
    	return func(attempt uint) time.Duration {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 14.4K bytes
    - Viewed (0)
Back to top