We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44aad20 commit 64406fdCopy full SHA for 64406fd
clickhouse-proxy/src/lib.rs
@@ -246,6 +246,11 @@ impl State {
246
}
247
248
249
+#[derive(serde::Serialize)]
250
+struct Info {
251
+ version: &'static str,
252
+}
253
+
254
pub async fn main_impl(args: Flags) -> anyhow::Result<()> {
255
sqlsonnet::setup_logging();
256
@@ -266,6 +271,14 @@ pub async fn main_impl(args: Flags) -> anyhow::Result<()> {
266
271
let app = tracing_layer::add_layer(
267
272
axum::Router::new()
268
273
.route("/", axum::routing::post(handle_query))
274
+ .route(
275
+ "/info",
276
+ axum::routing::get(|| async move {
277
+ axum::Json(Info {
278
+ version: env!("CARGO_PKG_VERSION"),
279
+ })
280
+ }),
281
+ )
269
282
.nest("/play", playground::router())
270
283
.route(
284
"/metrics",
0 commit comments