pub struct Watchdog { /* private fields */ }Implementations§
Source§impl Watchdog
impl Watchdog
pub fn new( config: AppConfig, core: Box<dyn ProxyCore>, probe: Box<dyn HealthProbe>, notifiers: Vec<Box<dyn Notifier>>, ) -> Self
pub fn with_periodic_benchmark( self, config_path: Option<PathBuf>, probe_factory: ProbeFactory, ) -> Self
pub fn with_direct_probe(self, direct_probe: Box<dyn HealthProbe>) -> Self
pub async fn run_forever(&mut self) -> Result<()>
Sourcepub async fn run_periodic_benchmark(&mut self) -> Result<bool>
pub async fn run_periodic_benchmark(&mut self) -> Result<bool>
Run a non-disruptive parallel benchmark in the background, refresh profile priorities and recovery states, persist updated priorities to disk, and recover if active is dead.
pub async fn run_once(&mut self) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for Watchdog
impl !UnwindSafe for Watchdog
impl Forget for Watchdog
impl Freeze for Watchdogwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<ProfileConfig>: Freeze,
PhantomData<ProbeTarget>: Freeze,
*const dyn ProxyCore is !null: Freeze,
PhantomData<dyn ProxyCore>: Freeze,
*const dyn HealthProbe is !null: Freeze,
PhantomData<dyn HealthProbe>: Freeze,
*const dyn Fn(&str) -> Result<Box<dyn HealthProbe>, PilotError> + Sync + Send is !null: Freeze,
PhantomData<dyn Fn(&str) -> Result<Box<dyn HealthProbe>, PilotError> + Sync + Send>: Freeze,
PhantomData<Box<dyn Notifier>>: Freeze,
PhantomData<ProfileHealth>: Freeze,
PhantomData<(String, Instant)>: Freeze,
impl Move for Watchdog
impl Send for Watchdog
impl Sync for Watchdog
impl Unpin for Watchdog
impl UnsafeUnpin for Watchdogwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<ProfileConfig>: UnsafeUnpin,
PhantomData<ProbeTarget>: UnsafeUnpin,
*const dyn ProxyCore is !null: UnsafeUnpin,
PhantomData<dyn ProxyCore>: UnsafeUnpin,
*const dyn HealthProbe is !null: UnsafeUnpin,
PhantomData<dyn HealthProbe>: UnsafeUnpin,
*const dyn Fn(&str) -> Result<Box<dyn HealthProbe>, PilotError> + Sync + Send is !null: UnsafeUnpin,
PhantomData<dyn Fn(&str) -> Result<Box<dyn HealthProbe>, PilotError> + Sync + Send>: UnsafeUnpin,
PhantomData<Box<dyn Notifier>>: UnsafeUnpin,
PhantomData<ProfileHealth>: UnsafeUnpin,
PhantomData<(String, Instant)>: UnsafeUnpin,
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