opencode_rs 0.12.0

Rust SDK for OpenCode (HTTP-first hybrid with SSE streaming)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! V2 health API.

#[derive(Clone)]
pub struct HealthApi {
    http: super::V2HttpClient,
}

impl HealthApi {
    pub(crate) fn new(http: super::V2HttpClient) -> Self {
        Self { http }
    }

    pub async fn get(&self) -> crate::error::Result<crate::types::v2::health::Health> {
        self.http.get("/api/health").await
    }
}