Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RuleCooldown ¶
type RuleCooldown struct {
// contains filtered or unexported fields
}
func NewRuleCooldown ¶
func NewRuleCooldown(config RuleCooldownConfig) *RuleCooldown
func (*RuleCooldown) ShouldCooldown ¶
type RuleCooldownConfig ¶
type RuleCooldownConfig struct {
// Disabled is the master kill-switch for rule cooldown. When true, cooldown is
// bypassed entirely regardless of the other fields. Zero value (false) preserves
// the historical behavior of being governed by OnProfileFailure.
Disabled bool `mapstructure:"ruleCooldownDisabled"`
CooldownDuration time.Duration `mapstructure:"ruleCooldownDuration"`
CooldownAfterCount int `mapstructure:"ruleCooldownAfterCount"`
// Deprecated: retained for backward compatibility. Setting it false still disables
// cooldown, but new callers should use Disabled as the explicit master switch.
OnProfileFailure bool `mapstructure:"ruleCooldownOnProfileFailure"`
MaxSize int `mapstructure:"ruleCooldownMaxSize"`
}
Click to show internal directories.
Click to hide internal directories.