gojek / heimdall

An enhanced HTTP client for Go
http://gojek.tech
Apache License 2.0
2.63k stars 214 forks source link

[ENHANCEMENT] Add "retryDoer/hystrixDoer" implementation #69

Open MichaHoffmann opened 5 years ago

MichaHoffmann commented 5 years ago

When comparing https://github.com/gojek/heimdall/blob/master/httpclient/client.go and https://github.com/gojek/heimdall/blob/master/hystrix/hystrix_client.go it seems that they only differ fundamentally in their respective Do methods. One could factor that part out into seperate Doer implementations and only have one httpclient implementation that delegates to a configurable Doer.

I would be willing to file a PR if that is acceptable.

rShetty commented 5 years ago

Sure @MichaHoffmann you can work on this