File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -153,9 +153,10 @@ func RateLimiterWithConfig(config RateLimiterConfig) echo.MiddlewareFunc {
153
153
type (
154
154
// RateLimiterMemoryStore is the built-in store implementation for RateLimiter
155
155
RateLimiterMemoryStore struct {
156
- visitors map [string ]* Visitor
157
- mutex sync.Mutex
158
- rate rate.Limit
156
+ visitors map [string ]* Visitor
157
+ mutex sync.Mutex
158
+ rate rate.Limit //for more info check out Limiter docs - https://pkg.go.dev/golang.org/x/time/rate#Limit.
159
+
159
160
burst int
160
161
expiresIn time.Duration
161
162
lastCleanup time.Time
@@ -223,7 +224,7 @@ func NewRateLimiterMemoryStoreWithConfig(config RateLimiterMemoryStoreConfig) (s
223
224
224
225
// RateLimiterMemoryStoreConfig represents configuration for RateLimiterMemoryStore
225
226
type RateLimiterMemoryStoreConfig struct {
226
- Rate rate.Limit // Rate of requests allowed to pass as req/s
227
+ Rate rate.Limit // Rate of requests allowed to pass as req/s. For more info check out Limiter docs - https://pkg.go.dev/golang.org/x/time/rate#Limit.
227
228
Burst int // Burst additionally allows a number of requests to pass when rate limit is reached
228
229
ExpiresIn time.Duration // ExpiresIn is the duration after that a rate limiter is cleaned up
229
230
}
You can’t perform that action at this time.
0 commit comments