Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiLimiter ¶ added in v1.8.0
type ApiLimiter struct {
// contains filtered or unexported fields
}
ApiLimiter allows to rate limit API calls
func NewApiLimiter ¶ added in v1.8.0
func NewApiLimiter(metrics MetricsAPI, rateLimit float64, burst int) *ApiLimiter
NewApiLimiter returns a new API limiter with the specific rate limit and burst configuration. The MetricsAPI interface is called to allow for metrics accounting.