Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RoleLimits = map[string]struct { Limit int Window time.Duration }{ "admin": {Limit: 5000, Window: time.Minute}, "fis": {Limit: 1000, Window: time.Minute}, "utv": {Limit: 3000, Window: time.Minute}, "kamk": {Limit: 1000, Window: time.Minute}, "klab": {Limit: 1000, Window: time.Minute}, "tietoevry": {Limit: 5000, Window: time.Minute}, "coachtech": {Limit: 1000, Window: time.Minute}, "archinisis": {Limit: 1000, Window: time.Minute}, "default": {Limit: 500, Window: time.Minute}, }
Functions ¶
Types ¶
type FixedWindowRateLimiter ¶
func NewFixedWindowLimiter ¶
func NewFixedWindowLimiter(limit int, window time.Duration) *FixedWindowRateLimiter
type RedisSlidingLimiter ¶
func NewRedisSlidingLimiter ¶
func NewRedisSlidingLimiter(client *redis.Client) *RedisSlidingLimiter
Click to show internal directories.
Click to hide internal directories.