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.
| 17 | // gives the store the request context so it can set response headers (e.g. |
| 18 | // Retry-After / X-RateLimit-*) — see #2961. |
| 19 | type ctxAwareStore struct { |
| 20 | allowCalled bool |
| 21 | ctxAllowCalled bool |
| 22 | allow bool |
| 23 | } |
| 24 | |
| 25 | func (s *ctxAwareStore) Allow(identifier string) (bool, error) { |
| 26 | s.allowCalled = true |
nothing calls this directly
no outgoing calls
no test coverage detected