alerts

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRecommendations

func GenerateRecommendations(ctx *AlertContext, config *config.Config) []string

GenerateRecommendations creates contextual recommendations

Types

type AlertContext

type AlertContext struct {
	SystemMetrics   *monitor.SystemMetrics
	UserMetrics     []monitor.UserMetrics
	PersistentUsers []monitor.PersistentUser
	SystemStatus    string
	Duration        time.Duration
	PrimaryCause    string
	Recommendations []string
}

AlertContext contains information for generating alerts

type AlertManager

type AlertManager struct {
	// contains filtered or unexported fields
}

AlertManager handles alert generation and notification

func NewAlertManager

func NewAlertManager(cfg *config.Config, storage *storage.Storage) *AlertManager

NewAlertManager creates a new alert manager

func (*AlertManager) CheckAndSendAlerts

func (am *AlertManager) CheckAndSendAlerts(ctx *AlertContext) error

CheckAndSendAlerts checks system conditions and sends alerts if necessary

Jump to

Keyboard shortcuts

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