Documentation
¶
Overview ¶
Package alerts decides when to notify the user that their network usage has crossed a configured threshold (a daily total cap, or a per-app daily cap). It is pure logic — posting the actual macOS notification is the caller's job — and it de-duplicates so each threshold fires at most once per calendar day.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigPath ¶
func ConfigPath() string
ConfigPath returns the on-disk path for the alert config, or "" if it can't be determined (~/Library/Application Support/netscope/alerts.json on macOS).
Types ¶
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker evaluates thresholds against today's totals and remembers what it has already fired today so it doesn't repeat. Safe for concurrent use.
Click to show internal directories.
Click to hide internal directories.