Skip to content

Instantly share code, notes, and snippets.

@rShetty
Created March 15, 2018 07:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rShetty/1de6efe854c0b4beb30599230531a45c to your computer and use it in GitHub Desktop.
Save rShetty/1de6efe854c0b4beb30599230531a45c to your computer and use it in GitHub Desktop.
Retries
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