pub struct NatsHealthMonitor { /* private fields */ }Expand description
NATS connection health monitor
Implementations§
Source§impl NatsHealthMonitor
impl NatsHealthMonitor
Sourcepub fn new(connection: Connection) -> (Self, Receiver<bool>)
pub fn new(connection: Connection) -> (Self, Receiver<bool>)
Create a new health monitor
Sourcepub async fn start_monitoring(&self)
pub async fn start_monitoring(&self)
Start health monitoring in a background task
Sourcepub async fn reconnect(&self) -> Result<Connection, Error>
pub async fn reconnect(&self) -> Result<Connection, Error>
Attempt to reconnect to NATS
Auto Trait Implementations§
impl Freeze for NatsHealthMonitor
impl !RefUnwindSafe for NatsHealthMonitor
impl Send for NatsHealthMonitor
impl Sync for NatsHealthMonitor
impl Unpin for NatsHealthMonitor
impl !UnwindSafe for NatsHealthMonitor
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