Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RateLimiter ¶
type RateLimiter interface { Allow(ctx context.Context, key string, limit, duration int) (*redis_rate.Result, error) ShouldAllow(ctx context.Context, key string, limit, duration int) (*redis_rate.Result, error) }
func NewLimiter ¶
func NewLimiter(cfg config.LimiterConfiguration) (RateLimiter, error)
Click to show internal directories.
Click to hide internal directories.