Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Policy ¶
type Policy interface { // Allow attempts to allow a request to go through. The method returns // immediately with a true or false indicating if the request can make // progress Allow() bool }
Policy corresponds to a quota policy. A policy allows implementing layered and more complex rate limiting functionality.
func NewSimpleRateLimiter ¶
func NewSimpleRateLimiter(tb tokenbucket.TokenBucket) Policy
NewSimpleRateLimiter returns a new simple rate limiter
Click to show internal directories.
Click to hide internal directories.