RatelimitsClient
The rate limits client is a wrapper for Hatchet’s gRPC API that makes it easier to work with rate limits in Hatchet.
Methods
list()
Lists all rate limits for the current tenant.
Parameters
| Parameter | Type | Description |
|---|---|---|
opts | | { limit?: number; offset?: number; orderByDirection?: RateLimitOrderByDirection; orderByField?: RateLimitOrderByField; search?: string; } | undefined | The options for the list operation. |
Returns
Promise<RateLimitList>
A promise that resolves to the list of rate limits.
upsert()
Upserts a rate limit for the current tenant.
Parameters
| Parameter | Type | Description |
|---|---|---|
opts | CreateRateLimitOpts | The options for the upsert operation. |
Returns
Promise<string>
A promise that resolves to the key of the upserted rate limit.