fix test and description

This commit is contained in:
Evgeniy
2020-01-30 19:43:03 +03:00
parent f6fcfcb8fc
commit ffb9da0230
2 changed files with 4 additions and 7 deletions

View File

@@ -8,7 +8,7 @@ import (
type BackoffFunc func(ctx context.Context, req Request, attempts int) (time.Duration, error)
// exponential backoff multiplied by a factor of 0.1 second.
// exponential backoff is a function x^e multiplied by a factor of 0.1 second.
func exponentialBackoff(ctx context.Context, req Request, attempts int) (time.Duration, error) {
return time.Duration(math.Pow(float64(attempts), math.E)) * time.Millisecond * 100, nil
}