feat(kernel): complete tree-first graph tasks 074-080

This commit is contained in:
lix-2026
2026-04-16 22:01:51 +08:00
parent 2ff10fa86c
commit b1d5d97142
65 changed files with 11579 additions and 4606 deletions
@@ -0,0 +1,30 @@
use crate::app::AppState;
use crate::context::RequestContext;
use axum::extract::{Extension, State};
use axum::Json;
use serde::Serialize;
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct HealthResponse {
pub ok: bool,
pub service: String,
pub version: String,
pub request_id: String,
pub trace_id: String,
pub runtime: &'static str,
}
pub async fn health(
State(state): State<AppState>,
Extension(context): Extension<RequestContext>,
) -> Json<HealthResponse> {
Json(HealthResponse {
ok: true,
service: state.config().service_name.clone(),
version: state.config().service_version.clone(),
request_id: context.trace.request_id,
trace_id: context.trace.trace_id,
runtime: "axum",
})
}