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::{BlockingClient, Result, types::HealthResponse};

#[derive(Clone)]
pub struct BlockingHealthService {
    client: BlockingClient,
}

impl BlockingHealthService {
    pub(crate) fn new(client: BlockingClient) -> Self {
        Self { client }
    }

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