#[non_exhaustive]
pub enum NodeSelectionStrategy {
PinUntilError,
PinUntilErrorWithoutReshuffle,
Balanced,
}Expand description
Specifies the strategy used to select a node of a service to use for a request attempt.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
PinUntilError
Pin to a single host as long as it continues to successfully respond to requests.
If the pinned node fails to successfully respond, the client will rotate through the other nodes until it finds one that can successfully respond and then pin to that new node. The pinned node will also be randomly rotated periodically to help spread load across the cluster.
This is the default behavior.
PinUntilErrorWithoutReshuffle
Like PinUntilError except that the pinned node is never randomly shuffled.
Balanced
For each new request, select the “next” node (in some unspecified order).
Trait Implementations
sourceimpl Clone for NodeSelectionStrategy
impl Clone for NodeSelectionStrategy
sourcefn clone(&self) -> NodeSelectionStrategy
fn clone(&self) -> NodeSelectionStrategy
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for NodeSelectionStrategy
impl Debug for NodeSelectionStrategy
impl Copy for NodeSelectionStrategy
impl Eq for NodeSelectionStrategy
impl StructuralEq for NodeSelectionStrategy
impl StructuralPartialEq for NodeSelectionStrategy
Auto Trait Implementations
impl RefUnwindSafe for NodeSelectionStrategy
impl Send for NodeSelectionStrategy
impl Sync for NodeSelectionStrategy
impl Unpin for NodeSelectionStrategy
impl UnwindSafe for NodeSelectionStrategy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more