hostnotify

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 7 Imported by: 0 modules, 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

Overview

Package hostnotify adapts authenticated host transitions to the shared notification core.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(store notify.Store, events Events, aliases map[string]string) error

Apply stores adapted outcomes; aliases retain the canonical ID when concurrent observers report one logical wait with different event keys. Only outstanding waits need aliases.

func DedupeKey

func DedupeKey(hostID string, event hostproto.NotifyEvent) (string, bool)

DedupeKey names the transition a withdrawal retires.

func Notification

func Notification(hostID string, event hostproto.NotifyEvent, now time.Time) (notify.Notification, bool)

Notification adapts one wire event into the local model.

Text is sanitized and bounded again on arrival even though the host did it before sending. The host is across an authenticated trust boundary, not inside it, and this is the last point before the text becomes a stored record that a local desktop service may later be handed.

Types

type Events

type Events struct {
	Post               []notify.Notification
	Dismiss            []string
	DismissTransitions []string
}

func Adapt

func Adapt(update hosts.Update, enabled bool, now time.Time) Events

Adapt keeps SSH opt-in, freshness, sanitization and host identity identical across consumers.

Jump to

Keyboard shortcuts

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