notifier

package
v0.54.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: BSD-2-Clause Imports: 9 Imported by: 0

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"
	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