circuitbreaker
circuitbreaker copied to clipboard
Use Request context for HTTPClient.Do
If the context is cancelled on the request the breaker considers that an error.
Instead of creating a new context, we use the one provided on the http.Request
, which returns context.Background()
if none is set. This should also make it backwards compatible, except for the issue we are fixing.