[][src]Struct metrics_exporter_http::HttpExporter

pub struct HttpExporter<C, R> { /* fields omitted */ }

Exports metrics over HTTP.

Methods

impl<C, R> HttpExporter<C, R> where
    C: AsyncSnapshotProvider + Clone + Send + 'static,
    C::SnapshotFuture: Send + 'static,
    C::SnapshotError: Error + Send + Sync + 'static,
    R: Recorder + Clone + Into<String> + Send + 'static, 
[src]

pub fn new(controller: C, recorder: R, address: SocketAddr) -> Self[src]

Creates a new HttpExporter that listens on the given address.

Recorders expose their output by being converted into strings.

pub fn run(self)[src]

Run the exporter on the current thread.

This starts an HTTP server on the address the exporter was originally configured with, responding to any request with the output of the configured recorder.

pub fn into_future(self) -> impl Future<Item = (), Error = ()>[src]

Converts this exporter into a future which can be driven externally.

This starts an HTTP server on the address the exporter was originally configured with, responding to any request with the output of the configured recorder.

Auto Trait Implementations

impl<C, R> Send for HttpExporter<C, R> where
    C: Send,
    R: Send

impl<C, R> Sync for HttpExporter<C, R> where
    C: Sync,
    R: Sync

Blanket Implementations

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.

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

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

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

impl<T> Erased for T