Skip to main content

InstanceSelector

Trait InstanceSelector 

Source
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§

Source

fn select( &self, service: &str, instances: &[ServiceInstance], ) -> DiscoveryResult<ServiceInstance>

Returns one instance, or an error when no healthy instance exists.

Implementors§