* NewRateLimiterMemoryStore returns an instance of RateLimiterMemoryStore with the provided rate (as req/s). for more info check out Limiter docs - https://pkg.go.dev/golang.org/x/time/rate#Limit. Burst and ExpiresIn will be set to default values. Note that if the provided rate is a float number a
(rateLimit float64)
| 198 | limiterStore := middleware.NewRateLimiterMemoryStore(20) |
| 199 | */ |
| 200 | func NewRateLimiterMemoryStore(rateLimit float64) (store *RateLimiterMemoryStore) { |
| 201 | return NewRateLimiterMemoryStoreWithConfig(RateLimiterMemoryStoreConfig{ |
| 202 | Rate: rateLimit, |
| 203 | }) |
| 204 | } |
| 205 | |
| 206 | /* |
| 207 | NewRateLimiterMemoryStoreWithConfig returns an instance of RateLimiterMemoryStore |
searching dependent graphs…