Update window docs

This commit is contained in:
Tobe O 2019-08-14 15:38:09 -04:00
parent 3760f68ccc
commit 2e2bf7c2ed

View file

@ -12,13 +12,22 @@ class RateLimitingWindow<User> {
final int pointsConsumed;
/// The maximum amount of points allowed within a single window.
///
/// This field is typically only set by the [RateLimiter] middleware,
/// and is therefore optional in the constructor.
final int pointLimit;
/// The amount of points the user can consume before hitting the
/// rate limit for the current window.
///
/// This field is typically only set by the [RateLimiter] middleware,
/// and is therefore optional in the constructor.
final int remainingPoints;
/// The time at which the window will reset.
///
/// This field is typically only set by the [RateLimiter] middleware,
/// and is therefore optional in the constructor.
final DateTime resetsAt;
RateLimitingWindow(this.user, this.start, this.pointsConsumed,