RateLimiter
No overview available.
Methods
Wait()
@classmethod
def Wait(
ctx: context.Context
) - > error
Blocks until the rate limiter permits an event to proceed, or until the provided context is cancelled. Callers use this to ensure that operations adhere to a predefined rate limit.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context that can be used to cancel the wait operation. If the context is cancelled, the method will return an error. |
Returns
| Type | Description |
|---|---|
error | An error if the context is cancelled before the wait completes, otherwise nil. |