[−][src]Struct metrics_exporter_http::HttpExporter
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]
C: AsyncSnapshotProvider + Clone + Send + 'static,
C::SnapshotFuture: Send + 'static,
C::SnapshotError: Error + Send + Sync + 'static,
R: Recorder + Clone + Into<String> + Send + 'static,
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,
C: Send,
R: Send,
impl<C, R> Sync for HttpExporter<C, R> where
C: Sync,
R: Sync,
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]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,