pub struct BootStateMachine { /* private fields */ }Expand description
Boot state machine with thread-safe state transitions
Implementations§
Source§impl BootStateMachine
impl BootStateMachine
Sourcepub fn new(budgets: BootBudgets) -> Self
pub fn new(budgets: BootBudgets) -> Self
Create a new boot state machine
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create with default budgets
Sourcepub fn current_phase(&self) -> BootPhase
pub fn current_phase(&self) -> BootPhase
Get current boot phase
Sourcepub fn current_progress(&self) -> PhaseProgress
pub fn current_progress(&self) -> PhaseProgress
Get current progress
Sourcepub fn remaining_budget(&self) -> Duration
pub fn remaining_budget(&self) -> Duration
Get time remaining in current phase budget
Sourcepub fn total_elapsed(&self) -> Duration
pub fn total_elapsed(&self) -> Duration
Get total boot elapsed time
Sourcepub fn start_boot(&self, recovery_mode: RecoveryMode) -> Result<(), BootError>
pub fn start_boot(&self, recovery_mode: RecoveryMode) -> Result<(), BootError>
Start the boot sequence
Sourcepub fn transition_to(&self, next_phase: BootPhase) -> Result<(), BootError>
pub fn transition_to(&self, next_phase: BootPhase) -> Result<(), BootError>
Transition to next phase
Sourcepub fn update_progress(&self, progress: PhaseProgress)
pub fn update_progress(&self, progress: PhaseProgress)
Update progress within current phase
Sourcepub fn failure_reason(&self) -> Option<String>
pub fn failure_reason(&self) -> Option<String>
Get failure reason if failed
Sourcepub fn set_preload_hints(&self, hints: PreloadHints)
pub fn set_preload_hints(&self, hints: PreloadHints)
Set preload hints for warmup phase
Sourcepub fn preload_hints(&self) -> PreloadHints
pub fn preload_hints(&self) -> PreloadHints
Get preload hints
Sourcepub fn metrics(&self) -> &BootMetrics
pub fn metrics(&self) -> &BootMetrics
Get boot metrics
Sourcepub fn record_wal_progress(&self, records: u64, bytes: u64)
pub fn record_wal_progress(&self, records: u64, bytes: u64)
Record WAL replay progress
Sourcepub fn record_page_recovered(&self, count: u64)
pub fn record_page_recovered(&self, count: u64)
Record page recovery
Sourcepub fn record_txn_rollback(&self, count: u64)
pub fn record_txn_rollback(&self, count: u64)
Record transaction rollback
Sourcepub fn health_status(&self) -> HealthStatus
pub fn health_status(&self) -> HealthStatus
Generate health check response for Kubernetes probes
Auto Trait Implementations§
impl !Freeze for BootStateMachine
impl !RefUnwindSafe for BootStateMachine
impl Send for BootStateMachine
impl Sync for BootStateMachine
impl Unpin for BootStateMachine
impl UnwindSafe for BootStateMachine
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> 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