Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Limiter ¶
Limiter controls how frequently events are allowed to happen.
type Store ¶
type Store interface { // Get returns the limited resource for given key. Get(ctx context.Context, rate *Rate, key string) (Resource, error) // Peek returns the limited resource for given key, without modification on current values. Peek(ctx context.Context, rate *Rate, key string) (Resource, error) }
Store is the common interface for limiter stores.
Click to show internal directories.
Click to hide internal directories.