{"repo":"gojek/heimdall","free":true,"listed":false,"github":"https://github.com/gojek/heimdall","clone":"git clone https://github.com/gojek/heimdall.git","description":"An enhanced HTTP client for Go","language":"Go","stars":2774,"topics":["circuit-breaker","hystrix","retries","backoff","scale","distributed-systems","httpclient","golang"],"license":"Apache-2.0","category":"dev-tools","readme_excerpt":"Heimdall Description Installation Usage + Making a simple GET request + Creating a hystrix-like circuit breaker + Creating a hystrix-like circuit breaker with fallbacks + Creating an HTTP client with a retry mechanism + Custom retry mechanisms + Custom HTTP clients Plugins Documentation FAQ License Description Heimdall is an HTTP client that helps your application make a large number of requests, at scale. With Heimdall, you can: - Use a hystrix-like circuit breaker to control failing requests - Add synchronous in-memory retries to each request, with the option of setting your own retrier strategy - Create clients with different timeouts for every request All HTTP methods are exposed as a fluent interface. Installation Usage Importing the package This package can be used by adding the following import statement to your .go files. Making a simple GET request The below example will print the contents of the google home page: You can also use the http.Request object with the http.Do interface : Creating a hystrix-like circuit breaker To import hystrix package of heimdall. You can use the hystrix.NewClient function to create a client wrapped in a hystrix-like circuit breaker: In the above example, there are two timeout values used: one for the hystrix configuration, and one for the HTTP client configuration. The former determines the time at which hystrix should register an error, while the latter determines when the client itself should return a timeout error. Unless you have an","default_branch":null,"files":null,"tree":[],"storefront":"/r/gojek","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gojek/heimdall/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}