Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyRateLimit ¶
type KeyRateLimit struct {
// contains filtered or unexported fields
}
func NewKeyRateLimit ¶
func NewKeyRateLimit() *KeyRateLimit
func (*KeyRateLimit) Acquire ¶
func (k *KeyRateLimit) Acquire(key string, rate int) *ratelimit.RateLimiter
func (*KeyRateLimit) Release ¶
func (k *KeyRateLimit) Release(key string)
Click to show internal directories.
Click to hide internal directories.