https://github.com/vgarvardt/backoff
Backoff implementation extracted from Google gRPC
https://github.com/vgarvardt/backoff
Last synced: 4 months ago
JSON representation
Backoff implementation extracted from Google gRPC
- Host: GitHub
- URL: https://github.com/vgarvardt/backoff
- Owner: vgarvardt
- License: apache-2.0
- Created: 2020-06-20T18:22:47.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-20T18:43:40.000Z (almost 5 years ago)
- Last Synced: 2025-02-24T05:36:36.455Z (4 months ago)
- Language: Go
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Backoff
Exponential backoff implementation extracted from [`gRPC-Go`](https://github.com/grpc/grpc-go)
`gRPC-Go` has really nice exponential backoff implementation, but it is impossible to reuse as it resides
in `internal` package, so it can be imported only within `gRPC-Go`.## Usage
```go
package mainimport "github.com/vgarvardt/backoff"
func main() {
retry := 5
waitFor := backoff.DefaultExponential.Backoff(retry)
...
}
```