pub(crate) async fn serve(config_path: &Path) -> Result<(), String>Expand description
Loads config_path, starts the enabled adapters, and blocks until Ctrl-C.
Schema compilation and address resolution happen before any adapter task is spawned, so a bad input exits cleanly instead of leaving an earlier adapter already listening.
On Ctrl-C the cancellation token is fired and every adapter task is joined. An adapter that failed earlier has already been logged; a join error here is ignored so one panicked task cannot block the rest of shutdown.
ยงErrors
Returns an error if the config cannot be loaded, the schema or
validation mode is unusable, stomp.on_panic is not abort or
reconnect, dds.provider or dds.qos is unusable, no adapters
are enabled, an address cannot be resolved, or the process cannot
listen for Ctrl-C.