notify

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendEvent

func SendEvent(sender Sender, cfg config.NotificationsConfig, e event.Event)

SendEvent applies the same notification rules for paths that do not emit through Sink.

Types

type Message

type Message struct {
	Title string
	Body  string
}

Message is the user-visible payload sent to the platform notifier.

type PlatformSender

type PlatformSender struct{}

PlatformSender delivers notifications through the host OS.

func NewPlatformSender

func NewPlatformSender() PlatformSender

NewPlatformSender returns the best-effort sender for the current platform.

func (PlatformSender) Send

func (PlatformSender) Send(m Message) error

type Sender

type Sender interface {
	Send(Message) error
}

Sender delivers a notification without taking ownership of event routing.

type Sink

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

Sink forwards every event to inner and mirrors configured attention events to sender.

func NewSink

func NewSink(inner event.Sink, sender Sender, cfg config.NotificationsConfig) *Sink

NewSink wraps an existing event sink with best-effort notification delivery.

func (*Sink) Emit

func (s *Sink) Emit(e event.Event)

Emit preserves the underlying event stream before attempting notification side effects.

Jump to

Keyboard shortcuts

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