pub trait DiscoveryService: Send + Sync {
// Required methods
fn discover_nodes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ClusterNode>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn register_node<'life0, 'async_trait>(
&'life0 self,
node: ClusterNode,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn unregister_node<'life0, 'life1, 'async_trait>(
&'life0 self,
node_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn heartbeat<'life0, 'life1, 'async_trait>(
&'life0 self,
node_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Service for discovering nodes in the cluster
Required Methods§
Sourcefn discover_nodes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ClusterNode>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn discover_nodes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ClusterNode>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Discover nodes in the cluster
Sourcefn register_node<'life0, 'async_trait>(
&'life0 self,
node: ClusterNode,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register_node<'life0, 'async_trait>(
&'life0 self,
node: ClusterNode,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Register this node in the discovery service