Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenBucket ¶
type TokenBucket struct {
// contains filtered or unexported fields
}
TokenBucket rate limiter
func (*TokenBucket) Get ¶
func (t *TokenBucket) Get(amount float32) bool
Get gets amount tokens from the bucket, non-blocking. Returns true if tokens were available, and false otherwise
Click to show internal directories.
Click to hide internal directories.