package backoffutils
import "github.com/grpc-ecosystem/go-grpc-middleware/util/backoffutils"
Backoff Helper Utilities
Implements common backoff features.
Index ¶
Functions ¶
func ExponentBase2 ¶
ExponentBase2 computes 2^(a-1) where a >= 1. If a is 0, the result is 0.
func JitterUp ¶
JitterUp adds random jitter to the duration.
This adds or subtracts time from the duration within a given jitter fraction. For example for 10s and jitter 0.1, it will return a time within [9s, 11s])
Source Files ¶
- Version
- v1.4.0 (latest)
- Published
- Mar 15, 2023
- Platform
- windows/amd64
- Imports
- 2 packages
- Last checked
- 2 hours ago –
Tools for package owners.