oa_gateway::adapters

Function start

Source
pub(crate) async fn start(
    config: &Config,
    engine: Arc<Engine>,
    schema: Option<Arc<Schema>>,
    validate: ValidateMode,
    tls: HostTls,
    shutdown: CancellationToken,
) -> Result<Vec<JoinHandle<()>>, String>
Expand description

Resolves every listen/connect address, then spawns the adapters that are on.

Addresses are resolved first so a bad one fails cleanly instead of leaving the earlier adapters already running. An adapter that later fails is logged inside its task; the handle still completes so shutdown can join it.

schema and validate are handed to OWP and DDS. STOMP and loopback do not convert or check payloads.

§Errors

Returns an error if an enabled adapter’s address cannot be resolved, if owp.on_panic, dds.on_panic, or stomp.on_panic is not abort or reconnect, or if every adapter is disabled.