Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RateLimiter ¶
type RateLimiter struct {
// contains filtered or unexported fields
}
func NewRateLimiter ¶
func NewRateLimiter(limitPerSec float64, metricSetter func(v float64)) *RateLimiter
func (*RateLimiter) Account ¶
func (r *RateLimiter) Account(key string) bool
func (*RateLimiter) Start ¶
func (r *RateLimiter) Start()
func (*RateLimiter) Stop ¶
func (r *RateLimiter) Stop()
Click to show internal directories.
Click to hide internal directories.