alert

package
v1.5.1 Latest Latest
Warning

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

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

Documentation

Overview

Package alert provides an abstraction for sending alerts/notifications from Flow workflows and activities. The concrete implementation can be replaced later (Slack, PagerDuty, etc.).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Send

func Send(_ context.Context, a Alert) error

Send delivers an alert. Currently just logs it. TODO: Replace with real alerting backend (Slack, PagerDuty, etc.) when ready.

Types

type Alert

type Alert struct {
	Severity  Severity          `json:"severity"`
	Message   string            `json:"message"`
	Component string            `json:"component,omitempty"`
	Operation string            `json:"operation,omitempty"`
	TaskID    string            `json:"task_id,omitempty"`
	Details   map[string]string `json:"details,omitempty"`
}

Alert represents a single alert to be sent through the alerting system.

func (Alert) String

func (a Alert) String() string

type Severity

type Severity string

Severity represents the urgency level of an alert.

const (
	SeverityInfo     Severity = "info"
	SeverityWarning  Severity = "warning"
	SeverityCritical Severity = "critical"
)

Jump to

Keyboard shortcuts

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