monitor

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureRunning

func EnsureRunning(ctx context.Context, tmuxRunner tmux.Runner, queries *sqlc.Queries) error

EnsureRunning ensures the monitor is running in a dedicated tmux session. If the monitor session exists with a fresh heartbeat, it returns immediately. If the session is stale or missing, it (re)starts the monitor.

func Run

func Run(ctx context.Context, tmuxRunner tmux.Runner, queries *sqlc.Queries, homeDir string, logger *slog.Logger) error

Run starts a monitoring loop that syncs session statuses between tmux and the database. It runs an initial sync immediately, then repeats every second. Returns nil on context cancellation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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