[−][src]Struct prometheus_exporter::PrometheusExporter
Struct that holds everything together.
Implementations
impl PrometheusExporter
[src]
pub fn run(addr: &SocketAddr) -> Result<(), StartError>
[src]
Start the prometheus exporter and bind the hyper http server to the given socket.
pub fn run_and_notify(
addr: SocketAddr
) -> (Receiver<Update>, Sender<FinishedUpdate>)
[src]
addr: SocketAddr
) -> (Receiver<Update>, Sender<FinishedUpdate>)
Start the prometheus exporter, bind the hyper http server to the given socket and send messages when there are new requests for metrics. This is usefull if metrics should be updated everytime there is a requests.
pub fn run_and_repeat(
addr: SocketAddr,
duration: Duration
) -> (Receiver<Update>, Sender<FinishedUpdate>)
[src]
addr: SocketAddr,
duration: Duration
) -> (Receiver<Update>, Sender<FinishedUpdate>)
Starts the prometheus exporter with http and will continiously send a message to update the metrics and wait inbetween for the given duration.
Auto Trait Implementations
impl RefUnwindSafe for PrometheusExporter
impl Send for PrometheusExporter
impl Sync for PrometheusExporter
impl Unpin for PrometheusExporter
impl UnwindSafe for PrometheusExporter
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,