Documentation ¶
Overview ¶
Package middleware defines possible middleware that can be used by router
Index ¶
Constants ¶
View Source
const ( // ExpiryTime defines how long before the user got deleted ExpiryTime time.Duration = 3 * time.Minute // RefreshRate deinfes how often we check the map for expired user RefreshRate time.Duration = 1 * time.Minute // AvgRate defines the average of r tokens (one) per seconds AvgRate rate.Limit = 1 // MaxRate defines the maximum of b tokens (five) in single `burst` MaxRate int = 3 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.