AgentRegistry

Trait AgentRegistry 

Source
pub trait AgentRegistry: Send + Sync {
    // Required methods
    fn register<'life0, 'life1, 'async_trait>(
        &'life0 self,
        manifest: &'life1 AgentManifest,
    ) -> Pin<Box<dyn Future<Output = RegistryResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn heartbeat<'life0, 'life1, 'async_trait>(
        &'life0 self,
        manifest: &'life1 AgentManifest,
    ) -> Pin<Box<dyn Future<Output = RegistryResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn deregister<'life0, 'life1, 'async_trait>(
        &'life0 self,
        manifest: &'life1 AgentManifest,
    ) -> Pin<Box<dyn Future<Output = RegistryResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait implemented by discovery/registry backends.

Required Methods§

Source

fn register<'life0, 'life1, 'async_trait>( &'life0 self, manifest: &'life1 AgentManifest, ) -> Pin<Box<dyn Future<Output = RegistryResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Registers an agent manifest with the mesh.

Source

fn heartbeat<'life0, 'life1, 'async_trait>( &'life0 self, manifest: &'life1 AgentManifest, ) -> Pin<Box<dyn Future<Output = RegistryResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Sends a heartbeat for an already registered agent.

Source

fn deregister<'life0, 'life1, 'async_trait>( &'life0 self, manifest: &'life1 AgentManifest, ) -> Pin<Box<dyn Future<Output = RegistryResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Removes the agent from the registry.

Implementors§