cometbft_rpc/endpoint/
health.rs

1//! `/health` endpoint JSON-RPC wrapper
2
3use serde::{Deserialize, Serialize};
4
5use crate::{dialect::Dialect, request::RequestMessage};
6
7/// Perform a basic healthceck of the backend
8#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
9pub struct Request;
10
11impl RequestMessage for Request {
12    fn method(&self) -> crate::Method {
13        crate::Method::Health
14    }
15}
16
17impl<S: Dialect> crate::Request<S> for Request {
18    type Response = Response;
19}
20
21impl<S: Dialect> crate::SimpleRequest<S> for Request {
22    type Output = Response;
23}
24
25/// Healthcheck responses
26#[derive(Clone, Debug, Deserialize, Serialize)]
27pub struct Response {}
28
29impl crate::Response for Response {}