Skip to main content

OrchestratorConnection

Trait OrchestratorConnection 

Source
pub trait OrchestratorConnection: Send + Sync {
    // Required methods
    fn push<'life0, 'async_trait>(
        &'life0 self,
        message: OrchestratorMessage,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn recv<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Option<OrchestratorMessage>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn is_connected(&self) -> bool;
}
Expand description

Trait for bidirectional orchestrator communication.

Required Methods§

Source

fn push<'life0, 'async_trait>( &'life0 self, message: OrchestratorMessage, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Push a message from agent to orchestrator (fire-and-forget)

Source

fn recv<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Option<OrchestratorMessage>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Receive the next message from orchestrator (blocking await)

Source

fn is_connected(&self) -> bool

Check if connected

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§