pub struct RemoteRouterConfig {
pub nodes: Arc<Vec<Address>>,
pub strategy: RemoteRouterStrategy,
pub endpoint_manager: EndpointManager,
/* private fields */
}Fields§
§nodes: Arc<Vec<Address>>§strategy: RemoteRouterStrategy§endpoint_manager: EndpointManagerImplementations§
Source§impl RemoteRouterConfig
impl RemoteRouterConfig
pub fn new( nodes: Vec<Address>, strategy: RemoteRouterStrategy, endpoint_manager: EndpointManager, ) -> Self
Sourcepub fn with_adaptive_picker(self, picker: AdaptivePicker) -> Self
pub fn with_adaptive_picker(self, picker: AdaptivePicker) -> Self
Install an adaptive picker for RemoteRouterStrategy::Adaptive.
Cluster-metrics callers wire AdaptiveLoadBalancer here:
ⓘ
router.with_adaptive_picker(Arc::new(move |cands| {
let refs: Vec<&str> = cands.iter().map(String::as_str).collect();
lb.pick(&refs).map(str::to_string)
}));Trait Implementations§
Source§impl Clone for RemoteRouterConfig
impl Clone for RemoteRouterConfig
Source§fn clone(&self) -> RemoteRouterConfig
fn clone(&self) -> RemoteRouterConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RemoteRouterConfig
impl !RefUnwindSafe for RemoteRouterConfig
impl Send for RemoteRouterConfig
impl Sync for RemoteRouterConfig
impl Unpin for RemoteRouterConfig
impl UnsafeUnpin for RemoteRouterConfig
impl !UnwindSafe for RemoteRouterConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more