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

Struct RateLimiterMemoryStore

middleware/rate_limiter.go:170–179  ·  view source on GitHub ↗

RateLimiterMemoryStore is the built-in store implementation for RateLimiter

Source from the content-addressed store, hash-verified

168
169// RateLimiterMemoryStore is the built-in store implementation for RateLimiter
170type RateLimiterMemoryStore struct {
171 visitors map[string]*Visitor
172 mutex sync.Mutex
173 rate float64 // for more info check out Limiter docs - https://pkg.go.dev/golang.org/x/time/rate#Limit
174 burst int
175 expiresIn time.Duration
176 lastCleanup time.Time
177
178 timeNow func() time.Time
179}
180
181// Visitor signifies a unique user's limiter details
182type Visitor struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected