Skip to main content

register

Function register 

Source
pub fn register(router: &mut Router, binding: ProjectBinding)
Expand description

Register every proof-of-life method onto router.

Why: keeps crate::serve::build_router a one-line call as more method groups (session/task/harness) register themselves the same way later. binding is taken here — rather than health staying a bare fn — so the daemon can REPORT which project it serves (#4512): a daemon binds exactly one ProjectBinding for its whole life, and a client that auto-attaches to a daemon it did not start has no other way to tell whether it is about to operate against the wrong project. What: registers "ping" and "health"; binding is shared into the health closure behind an Arc so answering a probe never clones a PathBuf. Test: methods_register_wires_ping_and_health, health_reports_the_daemons_project_binding.