pub enum ClusterError {
Show 41 variants
InvalidConfig(String),
NodeIdConflict(String),
NodeNotFound(String),
NodeUnreachable {
addr: SocketAddr,
},
NodeFailed {
node_id: String,
},
NoSeedNodes,
JoinFailed(String),
ClusterNotReady {
required: usize,
current: usize,
},
NotLeader {
leader: Option<String>,
},
LeaderElectionInProgress,
Raft(String),
RaftStorage(String),
ProposalTimeout,
ProposalRejected(String),
TopicNotFound(String),
TopicAlreadyExists(String),
PartitionNotFound {
topic: String,
partition: u32,
},
PartitionLeaderNotFound {
topic: String,
partition: u32,
},
InvalidPartitionCount(u32),
InvalidReplicationFactor {
factor: u16,
nodes: usize,
},
NotEnoughIsr {
required: u16,
current: u16,
},
ReplicationFailed(String),
ReplicaLagExceeded {
node_id: String,
lag_messages: u64,
},
HighWatermarkStalled,
Protocol(String),
InvalidMessage(String),
MessageTooLarge {
size: usize,
max: usize,
},
Serialization(String),
Deserialization(String),
ConnectionFailed(String),
ConnectionClosed,
Timeout,
Network(String),
Storage(String),
CorruptData(String),
Io(Error),
CryptoError(String),
Unauthorized(String),
Internal(String),
ChannelClosed,
ShuttingDown,
}Expand description
Cluster errors
Variants§
InvalidConfig(String)
NodeIdConflict(String)
NodeNotFound(String)
NodeUnreachable
Fields
§
addr: SocketAddrNodeFailed
NoSeedNodes
JoinFailed(String)
ClusterNotReady
NotLeader
LeaderElectionInProgress
Raft(String)
RaftStorage(String)
ProposalTimeout
ProposalRejected(String)
TopicNotFound(String)
TopicAlreadyExists(String)
PartitionNotFound
PartitionLeaderNotFound
InvalidPartitionCount(u32)
InvalidReplicationFactor
NotEnoughIsr
ReplicationFailed(String)
ReplicaLagExceeded
HighWatermarkStalled
Protocol(String)
InvalidMessage(String)
MessageTooLarge
Serialization(String)
Deserialization(String)
ConnectionFailed(String)
ConnectionClosed
Timeout
Network(String)
Storage(String)
CorruptData(String)
Io(Error)
CryptoError(String)
Raft RPC authentication failure
Internal(String)
ChannelClosed
ShuttingDown
Implementations§
Source§impl ClusterError
impl ClusterError
Sourcepub fn is_retriable(&self) -> bool
pub fn is_retriable(&self) -> bool
Check if this error is retriable
Sourcepub fn should_redirect(&self) -> bool
pub fn should_redirect(&self) -> bool
Check if this error indicates the node should redirect to leader
Trait Implementations§
Source§impl Debug for ClusterError
impl Debug for ClusterError
Source§impl Display for ClusterError
impl Display for ClusterError
Source§impl Error for ClusterError
impl Error for ClusterError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for ClusterError
impl From<Error> for ClusterError
Source§impl From<Error> for ClusterError
impl From<Error> for ClusterError
Source§impl From<RecvError> for ClusterError
impl From<RecvError> for ClusterError
Auto Trait Implementations§
impl Freeze for ClusterError
impl !RefUnwindSafe for ClusterError
impl Send for ClusterError
impl Sync for ClusterError
impl Unpin for ClusterError
impl UnsafeUnpin for ClusterError
impl !UnwindSafe for ClusterError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.