[][src]Struct prometheus_exporter::PrometheusExporter

pub struct 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]

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]

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.