Struct ClusterNodeResult

Source
pub struct ClusterNodeResult {
    pub id: String,
    pub endpoint: String,
    pub ip: String,
    pub port: Option<u16>,
    pub hostname: Option<String>,
    pub tls_port: Option<u16>,
    pub role: String,
    pub replication_offset: usize,
    pub health: ClusterHealthStatus,
}
Expand description

Cluster node result for the cluster_shards command.

Fields§

§id: String

The unique node id for this particular node.

§endpoint: String

The preferred endpoint to reach the node

§ip: String

The IP address to send requests to for this node.

§port: Option<u16>

The TCP (non-TLS) port of the node. At least one of port or tls-port will be present.

§hostname: Option<String>

The announced hostname to send requests to for this node.

§tls_port: Option<u16>

The TLS port of the node. At least one of port or tls-port will be present.

§role: String

The replication role of this node.

§replication_offset: usize

The replication offset of this node. This information can be used to send commands to the most up to date replicas.

§health: ClusterHealthStatus

Either online, failed, or loading. This information should be used to determine which nodes should be sent traffic. The loading health state should be used to know that a node is not currently eligible to serve traffic, but may be eligible in the future.

Trait Implementations§

Source§

impl Debug for ClusterNodeResult

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromValue for ClusterNodeResult

Source§

fn from_value(value: Value) -> Result<Self>

Used to do Value to user type conversion Read more
Source§

fn from_value_with_command(value: Value, _command: &Command) -> Result<Self>

Source§

fn next_functor<I: Iterator<Item = Value>>() -> Box<dyn FnMut(&mut I) -> Option<Result<Self>>>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,