notifier

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 12 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 notifier drives the expiry surfaces from the pure expiry engine: States (per-key expiry), Banner (the debounced inline reminder), and Notify (the cadence-gated desktop alert). Scheduler install lives with the platform layer (the notify verb).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

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

Notifier computes and fires the reminders.

func New

func New(p paths.Paths, m *manifest.Manifest) *Notifier

New builds a Notifier over a manifest. It takes the whole manifest rather than just its defaults because the daily alert covers dangling keys as well as expiry, and deciding a key is dangling needs the profiles and hosts. m may be nil, in which case only expiry is reported.

func (*Notifier) Banner

func (n *Notifier) Banner(now time.Time) string

Banner returns the cheap, debounced inline reminder (empty when nothing is due or the debounce window hasn't elapsed). Mirrors Notifier.banner.

func (*Notifier) Dangling

func (n *Notifier) Dangling() []keyaudit.Finding

Dangling returns the blocking dangling-key findings, or none when there is no manifest to audit against. Only the blocking ones: a daily desktop alert is for a key that has stopped working, not for one that has yet to be minted.

func (*Notifier) Notify

func (n *Notifier) Notify(now time.Time, force bool) bool

Notify fires the cadence-gated desktop alert. Returns true if one was sent.

It covers dangling keys as well as expiry. An expiring key eventually stops working; a dangling one already has, and it was the only class of problem the daily reminder could not tell you about - so the one surface that reaches a user who is not running sshmgr now reports both.

func (*Notifier) States

func (n *Notifier) States(now time.Time) ([]expiry.Status, error)

States returns per-key expiry status as of now. Mirrors Notifier.states.

func (*Notifier) Test

func (n *Notifier) Test() bool

Test posts a test desktop notification.

Jump to

Keyboard shortcuts

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