notifications

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 13 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 notifications connects Pilot to the shared Beacon notifications (pulse/pkg/notify): its channels and routing live in notify's store, and Pilot's internal events are turned into the shared events here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthCheck

func HealthCheck(report func(ctx context.Context) []health.Issue) func(ctx context.Context) []notify.Problem

HealthCheck adapts Pilot's health report for notify.HealthWatcher. The key ignores numbers, so "2.0 GB free" becoming "1.9 GB free" is the same problem, not a new one.

func Setup

func Setup(ctx context.Context, d Deps) (*notify.Store, *notify.Outbox, error)

Setup opens the store, brings over channels set up before the shared notifications existed (once), and starts turning Pilot's events into notifications. Run the returned outbox's Run in the background.

Types

type Deps

type Deps struct {
	DB  *sql.DB
	Q   db.Querier
	Bus *events.Bus
	// Hub returns Pulse when Pilot is connected to it, nil otherwise.
	Hub func() notify.Hub
	Log *slog.Logger
}

Deps is what Setup needs from Pilot.

Jump to

Keyboard shortcuts

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