Created
March 15, 2018 07:21
-
-
Save rShetty/1de6efe854c0b4beb30599230531a45c to your computer and use it in GitHub Desktop.
Retries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
backoff := heimdall.NewConstantBackoff(500) | |
retrier := heimdall.NewRetrier(backoff) | |
httpClient := heimdall.NewHTTPClient(1 * time.Millisecond) | |
httpClient.SetRetrier(retrier) | |
httpClient.SetRetryCount(3) | |
httpClient.Get(“https://gojek.com/drivers", http.Header{}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment