Documentation
¶
Index ¶
Constants ¶
View Source
const RetryCount = 3
Variables ¶
This section is empty.
Functions ¶
func NewThrottledTransport ¶ added in v0.43.0
func NewThrottledTransport(limitPeriod time.Duration, requestCount int, transportWrap http.RoundTripper) http.RoundTripper
Types ¶
type HTTPClient ¶
type HTTPClient interface { Do(req *http.Request) (*http.Response, error) Get(url string) (*http.Response, error) }
HTTPClient interface to define the contract of ALL http client to be used (http package or mocks)
func NewRetryClient ¶ added in v0.84.1
func NewRetryClient() HTTPClient
func NewThrottledClient ¶ added in v0.84.1
func NewThrottledClient(limitPeriod time.Duration, requestCount int, transportWrap http.RoundTripper) HTTPClient
type MockClient ¶ added in v0.19.0
MockClient is a stub implementation of an http.Client with a custom `Do` method
type ThrottledTransport ¶ added in v0.43.0
type ThrottledTransport struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.