pub struct RecoveryManager { /* private fields */ }Expand description
Manager for automatic kernel recovery.
Implementations§
Source§impl RecoveryManager
impl RecoveryManager
Sourcepub fn with_config(config: RecoveryConfig) -> Self
pub fn with_config(config: RecoveryConfig) -> Self
Create with specific configuration.
Sourcepub fn set_enabled(&self, enabled: bool)
pub fn set_enabled(&self, enabled: bool)
Enable/disable automatic recovery.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if recovery is enabled.
Sourcepub fn set_config(&self, config: RecoveryConfig)
pub fn set_config(&self, config: RecoveryConfig)
Update configuration.
Sourcepub fn config(&self) -> RecoveryConfig
pub fn config(&self) -> RecoveryConfig
Get current configuration.
Sourcepub fn register_handler(&self, policy: RecoveryPolicy, handler: RecoveryHandler)
pub fn register_handler(&self, policy: RecoveryPolicy, handler: RecoveryHandler)
Register a recovery handler.
Sourcepub fn should_recover(&self, kernel_id: &KernelId) -> bool
pub fn should_recover(&self, kernel_id: &KernelId) -> bool
Check if recovery should be attempted (respects cooldown).
Sourcepub fn determine_action(
&self,
kernel_id: &KernelId,
failure_type: FailureType,
) -> RecoveryAction
pub fn determine_action( &self, kernel_id: &KernelId, failure_type: FailureType, ) -> RecoveryAction
Determine recovery action for a failure.
Sourcepub async fn recover(&self, action: RecoveryAction) -> RecoveryResult
pub async fn recover(&self, action: RecoveryAction) -> RecoveryResult
Execute recovery for a kernel.
Sourcepub fn get_history(&self, kernel_id: &KernelId) -> Vec<RecoveryResult>
pub fn get_history(&self, kernel_id: &KernelId) -> Vec<RecoveryResult>
Get recovery history for a kernel.
Sourcepub fn clear_history(&self)
pub fn clear_history(&self)
Clear recovery history.
Sourcepub fn stats(&self) -> RecoveryStatsSnapshot
pub fn stats(&self) -> RecoveryStatsSnapshot
Get statistics snapshot.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RecoveryManager
impl !RefUnwindSafe for RecoveryManager
impl Send for RecoveryManager
impl Sync for RecoveryManager
impl Unpin for RecoveryManager
impl !UnwindSafe for RecoveryManager
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.