pub(crate) const UPDATE_REQUIRED_MESSAGE: &str = "NO MORE SUPPORTED PLEASE UPDATE";
pub type SyncResult<T> = Result<T, SyncError>;
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum SyncError {
IncompatiblePeer,
TransportFailed(String),
TransportTimeout(String),
HttpStatus(u16),
EmptyHttpResponse,
EmptyRequestBody,
RequestBodyTooLarge {
size: usize,
max: usize,
},
ResponseTooLarge {
max: usize,
},
TooManyEvents {
count: usize,
max: usize,
},
InvalidSequence(u64),
SequenceConflict(u64),
SnapshotUnsupported,
InvalidSnapshot(&'static str),
InvalidPeerId,
InvalidPeerAddress,
UnsupportedPeerScheme,
DnsResolutionFailed(String),
TlsFailed(String),
LogIndexOutOfBounds {
index: usize,
len: usize,
},
LockPoisoned(&'static str),
InvalidSyncMessage(&'static str),
InvalidEventHex,
CorruptReplicationLog {
line: usize,
reason: &'static str,
},
CorruptOutbox {
line: usize,
},
ElectionFailed(String),
ReplicationFailed(String),
PeerNotFound(String),
}