alerts

package
v0.0.0-...-e6b51b8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountDeniesWithinWindow

func CountDeniesWithinWindow(denyTimes []time.Time, since time.Time) int

func FilterDeniesWithinWindow

func FilterDeniesWithinWindow(denyTimes []time.Time, since time.Time) []time.Time

func ShouldCreateAlertEvent

func ShouldCreateAlertEvent(denyCount int, cfg DenySpikeConfig, existingInWindow bool) bool

func ShouldFireDenySpike

func ShouldFireDenySpike(denyCount int, cfg DenySpikeConfig) bool

Types

type DenySpikeConfig

type DenySpikeConfig struct {
	N        int `json:"n"`
	MMinutes int `json:"m_minutes"`
}

func ParseDenySpikeConfig

func ParseDenySpikeConfig(raw json.RawMessage) (DenySpikeConfig, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL