Function prometheus_http_query::build_information
source · pub async fn build_information(host: &str) -> Result<BuildInformation, Error>
Expand description
Retrieve Prometheus server build information.
This is just a convenience function for one-off requests, see Client::build_information
.
use prometheus_http_query::build_information;
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), anyhow::Error> {
let response = build_information("http://localhost:9090").await;
assert!(response.is_ok());
Ok(())
}