https://github.com/arriqaaq/boomerang
Go-Http client with backoff/circuit breaker implemented
https://github.com/arriqaaq/boomerang
circuit-breaker exponential-backoff golang http-client hystrix jitter
Last synced: over 1 year ago
JSON representation
Go-Http client with backoff/circuit breaker implemented
- Host: GitHub
- URL: https://github.com/arriqaaq/boomerang
- Owner: arriqaaq
- License: mit
- Created: 2018-04-09T07:16:46.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-06-14T08:22:18.000Z (about 5 years ago)
- Last Synced: 2025-01-25T19:42:25.323Z (over 1 year ago)
- Topics: circuit-breaker, exponential-backoff, golang, http-client, hystrix, jitter
- Language: Go
- Size: 15.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
boomerang
================
This project is inspired by
1) Go's default http package
2) Jitter/Backoff ----> https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/
3) Hashicorp library https://github.com/hashicorp/go-retryablehttp
TODO
================
1) Test cases for hystrix, basic testing for hystrix client
2) More test cases for http client
3) Add Prometheus metric support on the client
EXAMPLE USAGE
================
1) HTTP Client
client := NewHttpClient(10*time.Millisecond, DefaultTransport())
backoffStratergy := NewExponentialBackoff(2*time.Millisecond, 10*time.Millisecond, 2.0)
client.SetRetries(3)
client.SetBackoff(backoffStratergy)
resp, err := client.Get("/foo/bar")
if err!=nil{
resp.Body.Close()
}
2) Hystrix Client (TODO)