notify

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package notify delivers change events to external sinks (Slack, webhooks). unknown-class changes never page (PRD §9.2); only medium+ severity notifies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShouldNotify

func ShouldNotify(ev model.ChangeEvent) bool

ShouldNotify reports whether an event warrants paging. unknown-class and info severity are report-only.

Types

type Notifier

type Notifier interface {
	Notify(ctx context.Context, events []model.ChangeEvent) error
}

Notifier delivers a batch of change events.

type Slack

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

Slack posts change events to a Slack incoming webhook.

func NewSlack

func NewSlack(webhookURL string) *Slack

NewSlack constructs a Slack notifier.

func (*Slack) Notify

func (s *Slack) Notify(ctx context.Context, events []model.ChangeEvent) error

Notify posts notifiable events (medium+ severity, never unknown) to Slack as a Block Kit message grouped by severity.

type Webhook

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

Webhook posts change events as JSON to an arbitrary HTTP endpoint.

func NewWebhook

func NewWebhook(url string) *Webhook

NewWebhook constructs a webhook notifier.

func (*Webhook) Notify

func (wh *Webhook) Notify(ctx context.Context, events []model.ChangeEvent) error

Notify POSTs all events (not just notifiable ones — the receiver decides) as a JSON array.

Jump to

Keyboard shortcuts

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