Implement deferred core utility parity APIs/tests and refresh tracking artifacts
This commit is contained in:
@@ -38,6 +38,12 @@ public sealed class RateCounter
|
||||
Interval = TimeSpan.FromSeconds(1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Factory wrapper for Go parity.
|
||||
/// Mirrors <c>newRateCounter</c>.
|
||||
/// </summary>
|
||||
public static RateCounter NewRateCounter(long limit) => new(limit);
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the event is within the rate limit for the current window.
|
||||
/// Mirrors <c>rateCounter.allow</c>.
|
||||
|
||||
Reference in New Issue
Block a user