MCPcopy
hub / github.com/labstack/echo / NewRateLimiterMemoryStore

Function NewRateLimiterMemoryStore

middleware/rate_limiter.go:200–204  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

198 limiterStore := middleware.NewRateLimiterMemoryStore(20)
199*/
200func NewRateLimiterMemoryStore(rateLimit float64) (store *RateLimiterMemoryStore) {
201 return NewRateLimiterMemoryStoreWithConfig(RateLimiterMemoryStoreConfig{
202 Rate: rateLimit,
203 })
204}
205
206/*
207NewRateLimiterMemoryStoreWithConfig returns an instance of RateLimiterMemoryStore

Used in the wild real call sites across dependent graphs

searching dependent graphs…