pub struct AddRaftVoterOptions { /* private fields */ }Expand description
Options for adding a voter to the KRaft controller quorum.
Implementations§
Source§impl AddRaftVoterOptions
impl AddRaftVoterOptions
Sourcepub fn new(voter_id: i32, voter_directory_id: [u8; 16]) -> Self
pub fn new(voter_id: i32, voter_directory_id: [u8; 16]) -> Self
Creates options with a 60-second controller timeout and no listeners.
Sourcepub fn cluster_id(self, cluster_id: impl Into<String>) -> Self
pub fn cluster_id(self, cluster_id: impl Into<String>) -> Self
Sets the expected Kafka cluster ID, when known.
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Sets the controller-side voter addition timeout.
Sourcepub fn listener(self, listener: RaftVoterListener) -> Self
pub fn listener(self, listener: RaftVoterListener) -> Self
Adds one listener endpoint to the voter registration.
Sourcepub fn ack_when_committed(self, ack_when_committed: bool) -> Self
pub fn ack_when_committed(self, ack_when_committed: bool) -> Self
Requests that v1 wait until the voter addition is committed.
Sourcepub fn cluster_id_ref(&self) -> Option<&str>
pub fn cluster_id_ref(&self) -> Option<&str>
Returns the configured cluster ID.
Sourcepub fn request_timeout(&self) -> Duration
pub fn request_timeout(&self) -> Duration
Returns the controller-side timeout.
Sourcepub fn voter_directory_id(&self) -> [u8; 16]
pub fn voter_directory_id(&self) -> [u8; 16]
Returns the voter directory UUID.
Sourcepub fn listeners(&self) -> &[RaftVoterListener]
pub fn listeners(&self) -> &[RaftVoterListener]
Returns the listener endpoints.
Sourcepub fn ack_when_committed_ref(&self) -> bool
pub fn ack_when_committed_ref(&self) -> bool
Returns whether the request waits for the committed quorum change.
Trait Implementations§
Source§impl Clone for AddRaftVoterOptions
impl Clone for AddRaftVoterOptions
Source§fn clone(&self) -> AddRaftVoterOptions
fn clone(&self) -> AddRaftVoterOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AddRaftVoterOptions
impl Debug for AddRaftVoterOptions
impl Eq for AddRaftVoterOptions
Source§impl PartialEq for AddRaftVoterOptions
impl PartialEq for AddRaftVoterOptions
impl StructuralPartialEq for AddRaftVoterOptions
Auto Trait Implementations§
impl Freeze for AddRaftVoterOptions
impl RefUnwindSafe for AddRaftVoterOptions
impl Send for AddRaftVoterOptions
impl Sync for AddRaftVoterOptions
impl Unpin for AddRaftVoterOptions
impl UnsafeUnpin for AddRaftVoterOptions
impl UnwindSafe for AddRaftVoterOptions
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