worker

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package worker provides background workers for processing alerts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertWorker

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

AlertWorker processes alert rules in the background.

func NewAlertWorker

func NewAlertWorker(
	alertStore warnly.AlertStore,
	analyticsStore warnly.AnalyticsStore,
	issueStore warnly.IssueStore,
	notificationStore warnly.NotificationStore,
	webhookNotifier *notifier.WebhookNotifier,
	now func() time.Time,
	interval time.Duration,
	instanceID string,
	logger *slog.Logger,
) *AlertWorker

NewAlertWorker creates a new alert worker.

func (*AlertWorker) Start

func (w *AlertWorker) Start(ctx context.Context)

Start begins processing alerts in the background.

func (*AlertWorker) Stop

func (w *AlertWorker) Stop()

Stop stops the alert worker.

Jump to

Keyboard shortcuts

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