Trait UDiscovery

Source
pub trait UDiscovery: Send + Sync {
    // Required methods
    fn find_services<'life0, 'async_trait>(
        &'life0 self,
        uri_pattern: UUri,
        recursive: bool,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<UUri>, UStatus>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_service_topics<'life0, 'async_trait>(
        &'life0 self,
        topic_pattern: UUri,
        recursive: bool,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceTopicInfo>, UStatus>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

The uProtocol Application Layer client interface to the uDiscovery service.

Please refer to the uDiscovery service specification for details.

Required Methods§

Source

fn find_services<'life0, 'async_trait>( &'life0 self, uri_pattern: UUri, recursive: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<UUri>, UStatus>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Finds service instances based on search criteria.

§Parameters
  • uri_pattern - The URI pattern to use for looking up service instances.
  • recursive - Flag indicating whether the service should extend the search to its parent uDiscovery node.
§Returns

The service instances matching the given search criteria.

Source

fn get_service_topics<'life0, 'async_trait>( &'life0 self, topic_pattern: UUri, recursive: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceTopicInfo>, UStatus>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Gets information about topic(s) that a service (instance) publishes messages to.

§Parameters
  • topic_pattern - The URI pattern to use for looking up topic information.
  • recursive - Flag indicating whether the service should extend the search to its parent uDiscovery node.
§Returns

The topics.

Implementors§