github.com/bingoohuang/gg@v0.0.0-20240325092523-45da7dee9335/pkg/backoff/README.md (about)

     1  # Exponential Backoff
     2  
     3  This is a Go port of the exponential backoff algorithm
     4  from [Google's HTTP Client Library for Java][google-http-java-client].
     5  
     6  [Exponential backoff][exponential backoff wiki]
     7  is an algorithm that uses feedback to multiplicatively decrease the rate of some process,
     8  in order to gradually find an acceptable rate.
     9  The retries exponentially increase and stop increasing when a certain threshold is met.
    10  
    11  ## Usage
    12  
    13  [original code](https://github.com/cenkalti/backoff)
    14  
    15  Import path is `github.com/bingoohuang/gg/pkg/backoff`.
    16  
    17  ## Resources
    18  
    19  [google-http-java-client]: https://github.com/google/google-http-java-client/blob/da1aa993e90285ec18579f1553339b00e19b3ab5/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java
    20  
    21  [exponential backoff wiki]: http://en.wikipedia.org/wiki/Exponential_backoff
    22  
    23  [advanced example]: https://pkg.go.dev/github.com/cenkalti/backoff/v4?tab=doc#pkg-examples