pub async fn runtime_information(
    host: &str
) -> Result<RuntimeInformation, Error>
Expand description

Retrieve Prometheus server runtime information.

This is just a convenience function for one-off requests, see Client::runtime_information.

use prometheus_http_query::runtime_information;

#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), anyhow::Error> {
    let response = runtime_information("http://localhost:9090").await;

    assert!(response.is_ok());

    Ok(())
}