modulepackage
0.0.0-20210321135403-0a5df00fdb84
Repository: https://github.com/isbrick/http-client.git
Documentation: pkg.go.dev
# README
http-client
Features
- Http retry
- Plugin support
Installation
go get -u github.com/isbrick/http-client
Usgae
Note: Get examples from client_test.go
# Functions
NewConstantBackoff returns an instance of ConstantBackoff.
NewExponentialBackoff returns an instance of ExponentialBackoff.
NewHClient returns a new instance of http Client.
NewNoRetrier returns a null object for retriable.
NewRetrier returns retrier with some backoff strategy.
WithHTTPTimeout sets hystrix timeout.
WithRetrier sets the strategy for retrying.
WithRetryCount sets the retry count for the hystrixHTTPClient.
# Type aliases
Option represents the client options.