oa_gateway::adapters::loopback

Function start

Source
pub(crate) fn start(
    section: &LoopbackSection,
    engine: Arc<Engine>,
    shutdown: CancellationToken,
) -> JoinHandle<()>
Expand description

Spawns Loopback on engine and returns a handle to its run task.

The engine is given twice: once so the adapter can subscribe as a handle, and again to [Adapter::run]. A failure from run is logged and the task still finishes, so one adapter cannot take the host down.