RateLimitGuardDeps
@forge/monorepo / backend/src / RateLimitGuardDeps
Type Alias: RateLimitGuardDeps
RateLimitGuardDeps =
object
Defined in: backend/src/usage/rate-limit.ts:117
Properties
now?
readonlyoptionalnow?: () =>number
Defined in: backend/src/usage/rate-limit.ts:127
Returns
number
observer?
readonlyoptionalobserver?:RateLimitObserver
Defined in: backend/src/usage/rate-limit.ts:126
policyFor
readonlypolicyFor: (context) =>Promise<RateLimitPolicy|undefined> |RateLimitPolicy|undefined
Defined in: backend/src/usage/rate-limit.ts:125
The policy for this tenant, or undefined for unlimited.
A function rather than a value, for the reason QuotaGuardDeps gives: limits are per tenant and change
without a redeploy, and a value captured at construction would be the limits of whoever booted the process.
Parameters
context
Returns
Promise<RateLimitPolicy | undefined> | RateLimitPolicy | undefined
store
readonlystore:RateLimitStore
Defined in: backend/src/usage/rate-limit.ts:118