MCPcopy Index your code
hub / github.com/labstack/echo / ctxAwareStore

Struct ctxAwareStore

middleware/rate_limiter_context_test.go:19–23  ·  view source on GitHub ↗

ctxAwareStore implements both Allow and the optional AllowContext. AllowContext gives the store the request context so it can set response headers (e.g. Retry-After / X-RateLimit-*) — see #2961.

Source from the content-addressed store, hash-verified

17// gives the store the request context so it can set response headers (e.g.
18// Retry-After / X-RateLimit-*) — see #2961.
19type ctxAwareStore struct {
20 allowCalled bool
21 ctxAllowCalled bool
22 allow bool
23}
24
25func (s *ctxAwareStore) Allow(identifier string) (bool, error) {
26 s.allowCalled = true

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected