InboundAdapter

Trait InboundAdapter 

Source
pub trait InboundAdapter: BaseAdapter {
    // Required method
    fn run<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}
Expand description

Inbound adapter: receives external data/events and produces Exchanges routed inside Allora.

Implementations should:

  • Parse / normalize an external protocol entity into a Message (payload + headers).
  • Invoke crate::adapter::ensure_correlation before dispatch.
  • Dispatch the Exchange via a channel / route.
  • Manage lifecycle (bind ports, subscribe to topics, handle shutdown).

Required Methods§

Source

fn run<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Run the adapter until stopped (lifecycle). Implementations define their own shutdown semantics.

Implementors§