RateLimitMessage class final

One call to RateLimitService, as ProcessRateLimitStore sends it through TypedCoordinatorChannel.callTyped (ADR-031): deeply immutable, so it crosses to the coordinator isolate by reference where the map of toArgs is copied entry by entry. op is an operation of RateLimitService.handle; the fields an operation does not read are 0.

Implemented types

Constructors

RateLimitMessage(String op, String key, {int max = 0, int decayMs = 0, int want = 0, int count = 0, int resetAt = 0})
A call of op for key.
const

Properties

count → int
The unused hits a release gives back.
final
decayMs → int
The window, in milliseconds.
final
hashCode → int
The hash code for this object.
no setterinherited
key → String
The limited key.
final
max → int
The most attempts in a window.
final
op → String
attempt, acquire, release, attempts, availableIn, clear or flush.
final
resetAt → int
Epoch milliseconds when the window of a release ends.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
want → int
The hits an acquire asks for.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toArgs() → Map<String, Object?>
The same call as the arguments of RateLimitService.handle, for a channel that is not a TypedCoordinatorChannel.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited