notify

package
v0.2.23 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package notify sends native desktop notifications, used by watch mode to alert on network changes (new/gone hosts, newly opened ports). It degrades to a no-op on platforms without a supported notifier so callers never need to special-case the environment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available() bool

Available reports whether a desktop notifier is usable on this system.

func Send

func Send(n Notification) error

Send posts a desktop notification, returning nil if delivered (or quietly if no notifier exists). It is best-effort: a missing notifier is not an error.

Types

type Notification

type Notification struct {
	Title    string
	Message  string
	Subtitle string // shown on macOS; ignored elsewhere
}

Notification is a single desktop alert.

Jump to

Keyboard shortcuts

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