Expand description
Daemon main loop: spawns hyperd, runs health listener, monitors hyperd liveness
and optional idle timeout, restarts hyperd if it dies.
By default, the daemon never auto-shuts down due to inactivity (opt-in via
--idle-timeout flag or HYPERDB_DAEMON_IDLE_TIMEOUT env var). When enabled,
client HEARTBEAT commands reset the idle timer (see DaemonState).
Structs§
- Daemon
Config - Configuration for the daemon process.
Enums§
- Restart
Attempt - Outcome of a single rate-limit check on the restart-history vector.
Constants§
- RESTART_
LIMIT - RESTART_
WINDOW - Restart-attempt rate limit: at most 3 attempts within this window. The 4th attempt within the window is rejected and triggers daemon shutdown.
Functions§
- run_
daemon - Run the daemon. This function blocks until shutdown is triggered.
- try_
record_ restart_ attempt - Prune restart-history entries older than
RESTART_WINDOW, then either recordnowas a new attempt or report that the limit is already exceeded.