Struct metrics::MetricsController
source · pub struct MetricsController {
pub(crate) agents: Vec<RecvTube>,
handler: RequestHandler,
pub(crate) closed_tubes: usize,
}
Expand description
Runs the metrics controller.
Fields§
§agents: Vec<RecvTube>
§handler: RequestHandler
§closed_tubes: usize
Implementations§
source§impl MetricsController
impl MetricsController
pub fn new(agents: Vec<RecvTube>) -> Self
sourcepub fn run(&mut self) -> Result<()>
pub fn run(&mut self) -> Result<()>
Run the metrics controller until all clients exit & close their Tubes.
sourcepub(crate) fn on_tube_readable(&self, client: &RecvTube)
pub(crate) fn on_tube_readable(&self, client: &RecvTube)
Handles a tube that has indicated it has data ready to read.
sourcepub(crate) fn on_connection_closed(&mut self) -> bool
pub(crate) fn on_connection_closed(&mut self) -> bool
Handles a closed connection, and returns a bool indicating whether the run loop itself should close.
source§impl MetricsController
impl MetricsController
pub(crate) fn run_internal(&mut self) -> Result<()>
Auto Trait Implementations§
impl RefUnwindSafe for MetricsController
impl Send for MetricsController
impl Sync for MetricsController
impl Unpin for MetricsController
impl UnwindSafe for MetricsController
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