Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewThrottledTransport ¶
func NewThrottledTransport(limitPeriod time.Duration, requestCount int, transportWrap http.RoundTripper) http.RoundTripper
Example usage: client := http.DefaultClient client.Transport = NewThrottledTransport(10*time.Seconds, 60, http.DefaultTransport) allows 60 requests every 10 seconds
Types ¶
type ThrottledTransport ¶
type ThrottledTransport struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.