| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Arbiter.Test.RateLimit
Description
Backend-parameterized integration tests for per-job rate limiting. Each
backend supplies a runner over the shared RLReg registry.
Synopsis
- data RLPayload = RLPayload {}
- type RLReg = '[Queue "arbiter_ratelimit_test" RLPayload]
- rateLimitTable :: Text
- setupRateLimitPolicy :: ByteString -> Text -> IO ()
- rateLimitSpec :: forall env m. HasRegistry m RLReg => (forall a. env -> m a -> IO a) -> SpecWith env
Documentation
A payload keyed by tenant, with a per-job token cost.
Instances
Source #type RLReg = '[Queue "arbiter_ratelimit_test" RLPayload]
A one-queue registry over RLPayload.
Source #rateLimitTable :: Text
Table name for RLReg, shared across backends.
Source #setupRateLimitPolicy :: ByteString -> Text -> IO ()
Upsert the registry's reflected policy rows into a schema.
Source #rateLimitSpec :: forall env m. HasRegistry m RLReg => (forall a. env -> m a -> IO a) -> SpecWith env
The rate-limit suite, run against any backend.