NewStrictAuthorizer is for testing only. It skips the caching layer, which is useful when every authorize call is unique (0% cache hit rate) and the cache overhead dominates.
(registry prometheus.Registerer)
| 322 | // which is useful when every authorize call is unique (0% cache hit |
| 323 | // rate) and the cache overhead dominates. |
| 324 | func NewStrictAuthorizer(registry prometheus.Registerer) Authorizer { |
| 325 | auth := NewAuthorizer(registry) |
| 326 | auth.strict = true |
| 327 | return auth |
| 328 | } |
| 329 | |
| 330 | func NewAuthorizer(registry prometheus.Registerer) *RegoAuthorizer { |
| 331 | queryOnce.Do(func() { |