From e29c02213a4a418af079f0ddb0bec13a8bd105f9 Mon Sep 17 00:00:00 2001 From: Patrick Beza Date: Wed, 19 Jun 2024 15:57:10 +0200 Subject: [PATCH] Add healthcheck endpoint to the proof data handler --- core/node/proof_data_handler/src/lib.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/node/proof_data_handler/src/lib.rs b/core/node/proof_data_handler/src/lib.rs index 5a3cb2d95b6a..f7d169ded4c0 100644 --- a/core/node/proof_data_handler/src/lib.rs +++ b/core/node/proof_data_handler/src/lib.rs @@ -1,7 +1,11 @@ use std::{net::SocketAddr, sync::Arc}; use anyhow::Context as _; -use axum::{extract::Path, routing::post, Json, Router}; +use axum::{ + extract::{Extension, Path}, + routing::{get, post}, + Json, Router, +}; use request_processor::RequestProcessor; use tee_request_processor::TeeRequestProcessor; use tokio::sync::watch; @@ -81,6 +85,10 @@ fn create_proof_processing_router( .await }, ), + ) + .route( + "/health", + get(|_: Extension<()>| async { Ok::<_, ()>("Service is up and running") }), ); if config.tee_support {