alert

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertEvent

type AlertEvent struct {
	IncidentID uuid.UUID
	Type       AlertType
	MonitorID  uuid.UUID
	MonitorURL string
	AlertEmail string
	Reason     string
	StatusCode int
	LatencyMs  int64
	CheckedAt  time.Time
}

type AlertService

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

func NewAlertService

func NewAlertService(alertConfig *config.AlertConfig, db *pgxpool.Pool, alertChan chan AlertEvent, logger *zerolog.Logger) *AlertService

func (*AlertService) Start

func (s *AlertService) Start()

func (*AlertService) WorkerClosingWait

func (s *AlertService) WorkerClosingWait()

WorkerClosingWait waits for alert workers to complete

type AlertType

type AlertType string
const (
	AlertTypeDown      AlertType = "DOWN"
	AlertTypeRecovered AlertType = "RECOVERED"
)

Jump to

Keyboard shortcuts

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