pub struct RaftServerBuilder { /* private fields */ }
Expand description
Builder for RaftServer
.
Implementations§
Source§impl RaftServerBuilder
impl RaftServerBuilder
Sourcepub fn id(&mut self, value: String) -> &mut Self
pub fn id(&mut self, value: String) -> &mut Self
ID is the unique ID for the server. These are currently the same as the address, but they will be changed to a real GUID in a future release of Nomad.
Sourcepub fn node(&mut self, value: String) -> &mut Self
pub fn node(&mut self, value: String) -> &mut Self
Node is the node name of the server, as known by Nomad, or this will be set to “(unknown)” otherwise.
Sourcepub fn address(&mut self, value: String) -> &mut Self
pub fn address(&mut self, value: String) -> &mut Self
Address is the IP:port of the server, used for Raft communications.
Sourcepub fn leader(&mut self, value: bool) -> &mut Self
pub fn leader(&mut self, value: bool) -> &mut Self
Leader is true if this server is the current cluster leader.
Sourcepub fn voter(&mut self, value: bool) -> &mut Self
pub fn voter(&mut self, value: bool) -> &mut Self
Voter is true if this server has a vote in the cluster. This might be false if the server is staging and still coming online, or if it’s a non-voting server, which will be added in a future release of Nomad.
Sourcepub fn raft_protocol(&mut self, value: String) -> &mut Self
pub fn raft_protocol(&mut self, value: String) -> &mut Self
RaftProtocol is the version of the Raft protocol spoken by this server.
Sourcepub fn build(&self) -> Result<RaftServer, RaftServerBuilderError>
pub fn build(&self) -> Result<RaftServer, RaftServerBuilderError>
Trait Implementations§
Source§impl Clone for RaftServerBuilder
impl Clone for RaftServerBuilder
Source§fn clone(&self) -> RaftServerBuilder
fn clone(&self) -> RaftServerBuilder
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 RaftServerBuilder
impl RefUnwindSafe for RaftServerBuilder
impl Send for RaftServerBuilder
impl Sync for RaftServerBuilder
impl Unpin for RaftServerBuilder
impl UnwindSafe for RaftServerBuilder
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