HasRateLimits
trait HasRateLimits
Methods
Determine if this resource's rate limits apply to an operation.
Resolve the admission policies for an operation.
Resolve the selected rate limiter store.
Resolve the identity whose limits and cooldowns this resource uses.
Determine if a denied rate limit should be awaited.
Resolve the stable cooldown key for an operation.
Determine if this resource's rate limits apply to an operation.
Resolve the selected rate limiter store.
Resolve the identity whose limits and cooldowns this resource uses.
Determine if a denied rate limit should be awaited.
Resolve the stable cooldown key for an operation.
Details
at line 22
final bool
usesRateLimits(PendingRequest $pendingRequest)
| internal |
Determine if this resource's rate limits apply to an operation.
at line 33
final array
resolveRateLimitPolicies(PendingRequest $pendingRequest)
| internal |
Resolve the admission policies for an operation.
at line 43
final UnitEnum|string|null
resolveRateLimitStoreName()
| internal |
Resolve the selected rate limiter store.
at line 53
final string
rateLimiterName()
| internal |
Resolve the identity whose limits and cooldowns this resource uses.
at line 63
final bool
shouldWaitForRateLimits(AdmissionPolicy|Cooldown $policy, Decision $result)
| internal |
Determine if a denied rate limit should be awaited.
at line 73
final string
resolveRateLimitCooldownKeyFor(PendingRequest $pendingRequest)
| internal |
Resolve the stable cooldown key for an operation.
at line 83
final int|null
resolveRateLimitCooldownFor(Response $response)
| internal |
Resolve the cooldown imposed by a response.
at line 91
protected bool
rateLimitingEnabled(PendingRequest $pendingRequest)
Determine if this resource's rate limits apply to an operation.
at line 101
abstract protected array
resolveRateLimits(PendingRequest $pendingRequest)
Resolve the admission policies for an operation.
at line 106
protected UnitEnum|string|null
resolveRateLimitStore()
Resolve the selected rate limiter store.
at line 117
protected string
resolveRateLimiterName()
Resolve the identity whose limits and cooldowns this resource uses.
Resources that return the same name share limits and cooldowns within the same store, key scope and policy identity.
at line 125
protected bool
waitForRateLimits(AdmissionPolicy|Cooldown $policy, Decision $result)
Determine if a denied rate limit should be awaited.
at line 133
protected string
resolveRateLimitCooldownKey(PendingRequest $pendingRequest)
Resolve the stable cooldown key for an operation.
at line 144
protected int|null
resolveRateLimitCooldown(Response $response)
Resolve the cooldown imposed by a response.
Override this method to support a provider-specific response format or enforce a maximum duration defined by the provider.