alert

package
v1.6.0 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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