Struct mongodb::topology::monitor::Monitor [] [src]

pub struct Monitor {
    pub running: Arc<AtomicBool>,
    // some fields omitted
}

Monitors and updates server and topology information.

Fields

running: Arc<AtomicBool>

While true, the monitor will check server connection health at the topology's heartbeat frequency rate.

Methods

impl Monitor
[src]

fn new(client: Client, host: Host, pool: Arc<ConnectionPool>, top_description: Arc<RwLock<TopologyDescription>>, server_description: Arc<RwLock<ServerDescription>>) -> Monitor

Returns a new monitor connected to the server.

fn is_master(&self) -> Result<(Cursor, i64)>

Returns an isMaster server response using an owned monitor socket.

fn request_update(&self)

fn run(&self)

Starts server monitoring.