alarmbridge

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Watch

func Watch(db *core.AlarmDB, onEvent func(source, message string), notify func(title, body string)) func()

Watch subscribes to db and, for every state change that represents an active raised alarm, records an audit event via onEvent(tag, message) and raises a user notification via notify(title, message). Both sinks are optional; a nil sink is skipped. Cleared/inactive states and bare acknowledgements are filtered out (see the package doc). The returned func unsubscribes and is safe to call more than once (it wraps core.AlarmDB's idempotent CancelFunc).

Types

This section is empty.

Jump to

Keyboard shortcuts

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