Skip to main content

mount_all_services

Function mount_all_services 

Source
pub fn mount_all_services(ns: &mut Namespace, ctx: &MountContext) -> usize
Expand description

Mount every inventory-registered service into ns at /srv/{name}.

This is the auto-wire path (#543): a service that impl_service_dispatch!s gets a /srv/{name} mount with no per-service code here. /srv/{name} is advisory convention; a caller may bind_mount a different prefix before or after. A service whose construct fails (e.g. its transport can’t be resolved yet) is logged and skipped — one unavailable service does not block the others.

Mounts land in ns directly; because [Namespace::fork] clones the mount table by Arc, a namespace forked after this call inherits every auto-mount (per-sandbox isolation is by forking the namespace, FS-D #365 — not by re-running this loop).