notifier

package
v0.199.12 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: BSD-2-Clause Imports: 9 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	ProjectName string
	EventType   string // "prompt_failed", "prompt_partial", "spec_verifying", "review_limit", "stuck_container", "preflight_failed"
	PromptName  string // filename without path, empty if not applicable
	PRURL       string // empty if not applicable
}

Event holds the data for a single notification.

type Notifier

type Notifier interface {
	Notify(ctx context.Context, event Event) error
}

Notifier sends a notification for a lifecycle event.

func NewDiscordNotifier

func NewDiscordNotifier(webhookURL string) Notifier

NewDiscordNotifier returns a Notifier that sends messages via Discord webhook.

func NewMultiNotifier

func NewMultiNotifier(notifiers ...Notifier) Notifier

NewMultiNotifier returns a Notifier that fans out to all provided notifiers. If notifiers is empty, returns a no-op Notifier.

func NewTelegramNotifier

func NewTelegramNotifier(botToken, chatID string) Notifier

NewTelegramNotifier returns a Notifier that sends messages via Telegram.

func NewTelegramNotifierWithBaseURL

func NewTelegramNotifierWithBaseURL(botToken, chatID, baseURL string) Notifier

NewTelegramNotifierWithBaseURL returns a Notifier that sends messages via Telegram, using the given base URL instead of the default api.telegram.org. Useful for testing.

Jump to

Keyboard shortcuts

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