Skip to main content

Module process

Module process 

Source
Expand description

Host-side child-process management: cloudflared quick tunnels and platform sleep inhibitors. These helpers are never started by unit tests; the CLI opts into them only for nexus host --tunnel or normal hosting.

Structs§

ChildGuard
A child process that is killed when hosting stops.
Tunnel
A quick trycloudflare.com tunnel process. Named-tunnel configuration is deliberately supplied by the CLI/setup layer; this type only owns the sidecar lifecycle and URL discovery.

Functions§

cloudflared_available
Whether cloudflared can be launched from PATH.
health_check
Probe the public host. A 401 from /v1/snapshot is healthy: it proves the tunnel reached the daemon and only host authentication stopped it.
on_battery
Battery warning used by the macOS host CLI.
require_cloudflared
A small helper for callers that need a consistent missing-sidecar error.
sleep_guard
Start the platform’s sleep inhibitor. Unsupported platforms return Ok(None); a missing Linux systemd-inhibit is an actionable error for the caller, which may choose to continue with a warning.