pub trait ServiceDiscovery {
// Required method
fn discover<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(BTreeSet<Backend>, HashMap<u64, bool>)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
ServiceDiscovery is the interface to discover Backends.
Required Methods§
Sourcefn discover<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(BTreeSet<Backend>, HashMap<u64, bool>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn discover<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(BTreeSet<Backend>, HashMap<u64, bool>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the discovered collection of backends.
And optionally whether these backends are enabled to serve or not in a HashMap
. Any backend
that is not explicitly in the set is considered enabled.