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(tokenRate, bucketSize int64) *RateLimiter
func (*RateLimiter) Grant ¶
func (r *RateLimiter) Grant() bool
Click to show internal directories.
Click to hide internal directories.