pub struct ServerHealthBuilder { /* private fields */ }
Expand description
Builder for ServerHealth
.
Implementations§
Source§impl ServerHealthBuilder
impl ServerHealthBuilder
Sourcepub fn last_contact(&mut self, value: TimeDelta) -> &mut Self
pub fn last_contact(&mut self, value: TimeDelta) -> &mut Self
LastContact is the time since this node’s last contact with the leader.
Sourcepub fn last_term(&mut self, value: u64) -> &mut Self
pub fn last_term(&mut self, value: u64) -> &mut Self
LastTerm is the highest leader term this server has a record of in its Raft log.
Sourcepub fn serf_status(&mut self, value: String) -> &mut Self
pub fn serf_status(&mut self, value: String) -> &mut Self
The status of the SerfHealth check for the server.
Sourcepub fn leader(&mut self, value: bool) -> &mut Self
pub fn leader(&mut self, value: bool) -> &mut Self
Leader is whether this server is currently the leader.
Sourcepub fn last_index(&mut self, value: u64) -> &mut Self
pub fn last_index(&mut self, value: u64) -> &mut Self
LastIndex is the last log index this server has a record of in its Raft log.
Sourcepub fn healthy(&mut self, value: bool) -> &mut Self
pub fn healthy(&mut self, value: bool) -> &mut Self
Healthy is whether or not the server is healthy according to the current Autopilot config.
Sourcepub fn stable_since(&mut self, value: DateTime<Utc>) -> &mut Self
pub fn stable_since(&mut self, value: DateTime<Utc>) -> &mut Self
StableSince is the last time this server’s Healthy value changed.
Sourcepub fn version(&mut self, value: String) -> &mut Self
pub fn version(&mut self, value: String) -> &mut Self
Version is the Nomad version of the server.
Sourcepub fn build(&self) -> Result<ServerHealth, ServerHealthBuilderError>
pub fn build(&self) -> Result<ServerHealth, ServerHealthBuilderError>
Trait Implementations§
Source§impl Clone for ServerHealthBuilder
impl Clone for ServerHealthBuilder
Source§fn clone(&self) -> ServerHealthBuilder
fn clone(&self) -> ServerHealthBuilder
Returns a copy 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 ServerHealthBuilder
impl RefUnwindSafe for ServerHealthBuilder
impl Send for ServerHealthBuilder
impl Sync for ServerHealthBuilder
impl Unpin for ServerHealthBuilder
impl UnwindSafe for ServerHealthBuilder
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