From 34b7c79bff36df6258bebae55526f0790723b465 Mon Sep 17 00:00:00 2001 From: alnoki <43892045+alnoki@users.noreply.github.com> Date: Mon, 2 Sep 2024 16:00:16 -0700 Subject: [PATCH] Update WS for root URL --- .github/workflows/push-broker.yaml | 2 +- src/rust/Cargo.lock | 2 +- src/rust/broker/Cargo.toml | 2 +- src/rust/broker/src/server.rs | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/push-broker.yaml b/.github/workflows/push-broker.yaml index ff1f66248..4f8c92366 100644 --- a/.github/workflows/push-broker.yaml +++ b/.github/workflows/push-broker.yaml @@ -25,7 +25,7 @@ jobs: context: 'src/rust' file: 'src/rust/broker/Dockerfile' labels: '${{ steps.metadata.outputs.labels }}' - platforms: '${{ vars.DOCKER_IMAGE_PLATFORMS }}' + platforms: 'linux/amd64' push: 'true' tags: '${{ steps.metadata.outputs.tags }}' timeout-minutes: 360 diff --git a/src/rust/Cargo.lock b/src/rust/Cargo.lock index d56c41314..5ad0cf53b 100644 --- a/src/rust/Cargo.lock +++ b/src/rust/Cargo.lock @@ -515,7 +515,7 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "broker" -version = "0.6.0" +version = "0.7.0" dependencies = [ "async-stream", "axum 0.7.5", diff --git a/src/rust/broker/Cargo.toml b/src/rust/broker/Cargo.toml index 697a2c2ff..5dc7b3f33 100644 --- a/src/rust/broker/Cargo.toml +++ b/src/rust/broker/Cargo.toml @@ -21,4 +21,4 @@ ws = [] edition = "2021" name = "broker" resolver = "2" -version = "0.6.0" +version = "0.7.0" diff --git a/src/rust/broker/src/server.rs b/src/rust/broker/src/server.rs index 54652dcda..943f43d26 100644 --- a/src/rust/broker/src/server.rs +++ b/src/rust/broker/src/server.rs @@ -25,12 +25,12 @@ fn prepare_app(app: Router>) -> Router> { #[cfg(all(feature = "ws", not(feature = "sse")))] fn prepare_app(app: Router>) -> Router> { - app.route("/ws", get(ws::handler)) + app.route("/", get(ws::handler)) } #[cfg(all(feature = "ws", feature = "sse"))] fn prepare_app(app: Router>) -> Router> { - app.route("/ws", get(ws::handler)) + app.route("/", get(ws::handler)) .route("/sse", get(sse::handler)) } @@ -39,7 +39,7 @@ fn prepare_app(app: Router>) -> Router> { app } -async fn root() {} +async fn live() {} async fn health(State(state): State>) -> StatusCode { match *state.processor_connection_health.read().await { @@ -60,7 +60,7 @@ pub async fn server( let app = prepare_app( Router::new() - .route("/", get(root)) + .route("/live", get(live)) .route("/health", get(health)), ); let app = app.with_state(Arc::new(app_state));