DiscoveryService

Trait DiscoveryService 

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

All discovery service provider must implement the trait. Note that, it’s based on async_trait

Required Methods§

Source

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

Returns list of instances

Implementors§