ratelimit

package
v1.34.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL