pub trait InstanceSelector: Send + Sync {
// Required method
fn select(
&self,
service: &str,
instances: &[ServiceInstance],
) -> DiscoveryResult<ServiceInstance>;
}Expand description
Selects one service instance from a discovered set.
Required Methods§
Sourcefn select(
&self,
service: &str,
instances: &[ServiceInstance],
) -> DiscoveryResult<ServiceInstance>
fn select( &self, service: &str, instances: &[ServiceInstance], ) -> DiscoveryResult<ServiceInstance>
Returns one instance, or an error when no healthy instance exists.