Skip to main content

Module serve

Module serve 

Source
Expand description

Bridged serve helper for the post-ZMQ spawn path (#136).

The RPC cutover replaces every RequestLoop::new(..).run(service) (ZMQ ROUTER) with this: bridge the service to a Send processor (LocalServiceBridge), then serve it over its registered transport via the same process_request dispatch core the quinn/iroh planes use.

Spawn-path transports (from EndpointRegistry::endpoint(name, Rep)):

  • Inproc{endpoint} (default daemon mode) → register the processor in the in-memory dial registry (register_inproc); no socket. The registry holds only a Weak, so the strong processor Arc is retained here for the service’s lifetime.
  • Ipc{path} (--ipc) → bind a UnixListener at path, run UdsRpcServer.
  • SystemdFd{fd,..} → adopt the systemd-passed listener fd, run UdsRpcServer.
  • Quic/Iroh are dialed, never bound on the spawn path → error.

Functions§

serve_bridged
Serve a bridged request processor over its registered transport until shutdown fires. See the module docs for the per-transport behaviour.
serve_bridged_with_shutdown_armed
Variant of serve_bridged that acknowledges after the shutdown waiter is registered, before startup readiness is signalled. This closes the window where an owner can notify shutdown after readiness but before the helper has begun waiting on the shared [Notify].
serve_bridged_with_shutdown_armed_silent
Variant of serve_bridged_with_shutdown_armed for nested helpers whose parent owns the service readiness boundary. It acknowledges the shutdown waiter but does not emit a systemd READY=1 notification.