CooldownHelper
class CooldownHelper
A helper class to keep track of a cooldown period based on errors occurring.
Parameters
maxInterval
The maximum amount of time a cooldown period can last.
errorBaseInterval
The amount of time to extend the cooldown for each consecutive failure, limited by the maxInterval
status
Defaults to CooldownStatus.Success, but this is typically only used for testing.
timingProvider
Provider function to provide the current time
Types
Properties
Link copied to clipboard
Link copied to clipboard
Gets the number of consecutive CooldownStatus.Failures that have been reported.
Link copied to clipboard
Link copied to clipboard
Gets the current CooldownStatus of this CooldownHelper
Functions
Link copied to clipboard
Determines whether or not the Cooldown period, if currently in one, has elapsed.
Link copied to clipboard
Used to notify the CooldownHelper of the latest status.