Skip to main content

Module connectivity

Module connectivity 

Source
Expand description

Fast offline detection for IPFRS CLI

Determines whether the IPFRS daemon is running and reachable within a bounded timeout (≤ 2 s). The checks are deliberately cheap:

  1. Look for the PID file on disk — if it is missing the daemon is definitely not running.
  2. Send signal 0 to the recorded PID to verify the process still exists (POSIX kill(pid, 0) semantic, implemented via std::process::Command).

A separate helper with_network_timeout wraps any Future with a configurable deadline so network-bound commands never block indefinitely.

Constants§

DAEMON_CHECK_TIMEOUT
Maximum time budget for all daemon-reachability checks.

Functions§

check_daemon_reachable
Check whether the IPFRS daemon is reachable.
offline_error_message
Build a user-friendly error message for the case where the IPFRS daemon is not running or not reachable.
with_network_timeout
Wrap a future with a wall-clock timeout.