RateLimitStore class abstract interface

Backing store of attempt counters (ADR-003 scopes).

Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scope → StateScope
Where the counters live: one isolate, the process, or the cluster.
no setter

Methods

attempt(String key, int maxAttempts, Duration decay) → Future<RateLimitResult>
Records an attempt for key when under the limit.
attempts(String key, Duration decay) → Future<int>
Attempts counted in the current window.
availableIn(String key, int maxAttempts, Duration decay) → Future<Duration>
Time until an attempt is possible again (zero when not limited).
clear(String key) → Future<void>
Forgets the attempts of key.
flush() → Future<void>
Forgets every attempt.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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