Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // When attempt to reserve a request slot, if one isn't available but // the delay is less than SleepDelayThreshold, we do a time.Sleep() // to wait for the slot to open up. If the delay is greater than this // value, we return a 429 error and give the time slice back. SleepDelayThreshold = 10 * time.Millisecond // How many token should be in the request token bucket at a time, to // be returned at any time. We set this to 20, which means initially // a client can do 20 requests without an issue, and then they refill // the that rate per their account limits (which, at the time of writing // is 5 per second for guests) RequestBurst = 20 )
Functions ¶
This section is empty.
Types ¶
type Frontend ¶
type Frontend struct { L hclog.Logger Checker HostnameChecker // contains filtered or unexported fields }
func NewFrontend ¶
type HostnameChecker ¶
Click to show internal directories.
Click to hide internal directories.