Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Limiter ¶
type Limiter struct {
// contains filtered or unexported fields
}
Limiter keeps track of an api rate limit and wont let you pass the limit
func (*Limiter) GateReq ¶ added in v1.1.3
func (limiter *Limiter) GateReq(client *http.Client, origReq *http.Request, body []byte) (*http.Response, error)
GateReq will make the http request but will force it to comply with concurrent limits, rate limits, and it will also retry requests that receive 429. When a 429 occurs, it will cancel all inflight requests and pauses, so that the requests dont continue to batter the server and cause bot detection
Click to show internal directories.
Click to hide internal directories.