Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean Karn authored Dec 31, 2017
1 parent c4a0561 commit fce2579
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Backoff library uses an exponential backoff algorithm to backoff between retries

What makes this different from other backoff libraries?
1. Simple, by automatically calculating the exponential factor between the min and max backoff times; which properly tunes to your desired values.
2. Provides an optional `AutoTune` function which will adjust the min backoff duration based upon successful backoff durations.
2. Provides an optional `AutoTune` function which will adjust the min backoff duration based upon successful backoff duration retries.

Why AutoTune?

Expand All @@ -32,6 +32,7 @@ import (
)

func main() {
// backoff.New(retries, min, max)
bo := backoff.New(5, time.Second, time.Minute)
defer bo.Close()

Expand Down Expand Up @@ -67,7 +68,9 @@ import (
)

func main() {
// backoff.New(retries, min, max)
bo := backoff.New(5, time.Second, 10*time.Second)
// bo.AutoTune(poll, reset)
bo.AutoTune(30*time.Second, 2*time.Minute)
defer bo.Close()

Expand Down Expand Up @@ -104,7 +107,7 @@ func main() {

Requirements
------------
>= Go v1.9
\>= Go v1.9

Package Versioning
---------------
Expand Down

0 comments on commit fce2579

Please sign in to comment.