grafana 0.1.3

Ergonomic Rust SDK for Grafana's HTTP API, with async and blocking clients.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::{Client, Result, types::HealthResponse};

#[derive(Clone)]
pub struct HealthService {
    client: Client,
}

impl HealthService {
    pub(crate) fn new(client: Client) -> Self {
        Self { client }
    }

    pub async fn get(&self) -> Result<HealthResponse> {
        self.client.get_json(&["health"], Option::<&()>::None).await
    }
}