pub struct FailoverReplay { /* private fields */ }Expand description
Failover Replay Manager
Implementations§
Source§impl FailoverReplay
impl FailoverReplay
Sourcepub fn new(config: ReplayConfig) -> Self
pub fn new(config: ReplayConfig) -> Self
Create a new failover replay manager
Sourcepub fn with_backend_template(self, template: BackendConfig) -> Self
pub fn with_backend_template(self, template: BackendConfig) -> Self
Attach a backend-connection template. Required for real replay; without it, all backend-touching calls take the skeleton path.
Sourcepub async fn register_endpoint(&self, node_id: NodeId, endpoint: NodeEndpoint)
pub async fn register_endpoint(&self, node_id: NodeId, endpoint: NodeEndpoint)
Register an endpoint for a node so replay can resolve where to send the statements. Idempotent.
Sourcepub async fn start_replay(
&self,
journal: TransactionJournalEntry,
target_node: NodeId,
) -> Result<Uuid>
pub async fn start_replay( &self, journal: TransactionJournalEntry, target_node: NodeId, ) -> Result<Uuid>
Start replaying a transaction
Sourcepub async fn execute_replay(&self, tx_id: Uuid) -> Result<ReplayResult>
pub async fn execute_replay(&self, tx_id: Uuid) -> Result<ReplayResult>
Execute the replay
Sourcepub async fn get_state(&self, tx_id: &Uuid) -> Option<ReplayState>
pub async fn get_state(&self, tx_id: &Uuid) -> Option<ReplayState>
Get replay state
Sourcepub async fn get_progress(&self, tx_id: &Uuid) -> Option<(usize, usize)>
pub async fn get_progress(&self, tx_id: &Uuid) -> Option<(usize, usize)>
Get replay progress (statements completed / total)
Sourcepub async fn cancel_replay(&self, tx_id: &Uuid) -> Result<()>
pub async fn cancel_replay(&self, tx_id: &Uuid) -> Result<()>
Cancel an active replay
Sourcepub async fn history(&self) -> Vec<ReplayResult>
pub async fn history(&self) -> Vec<ReplayResult>
Get recent replay history
Sourcepub async fn stats(&self) -> ReplayStats
pub async fn stats(&self) -> ReplayStats
Get statistics
Auto Trait Implementations§
impl Freeze for FailoverReplay
impl !RefUnwindSafe for FailoverReplay
impl Send for FailoverReplay
impl Sync for FailoverReplay
impl Unpin for FailoverReplay
impl UnsafeUnpin for FailoverReplay
impl !UnwindSafe for FailoverReplay
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more