Skip to content

Commit

Permalink
Revert WS pathing for ALB approach
Browse files Browse the repository at this point in the history
  • Loading branch information
alnoki committed Sep 1, 2024
1 parent 422f75c commit 3869b07
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push-broker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/rust/broker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ ws = []
edition = "2021"
name = "broker"
resolver = "2"
version = "0.5.0"
version = "0.6.0"
8 changes: 4 additions & 4 deletions src/rust/broker/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ fn prepare_app(app: Router<Arc<AppState>>) -> Router<Arc<AppState>> {

#[cfg(all(feature = "ws", not(feature = "sse")))]
fn prepare_app(app: Router<Arc<AppState>>) -> Router<Arc<AppState>> {
app.route("/", get(ws::handler))
app.route("/ws", get(ws::handler))
}

#[cfg(all(feature = "ws", feature = "sse"))]
fn prepare_app(app: Router<Arc<AppState>>) -> Router<Arc<AppState>> {
app.route("/", get(ws::handler))
app.route("/ws", get(ws::handler))
.route("/sse", get(sse::handler))
}

Expand All @@ -39,7 +39,7 @@ fn prepare_app(app: Router<Arc<AppState>>) -> Router<Arc<AppState>> {
app
}

async fn live() {}
async fn root() {}

async fn health(State(state): State<Arc<AppState>>) -> StatusCode {
match *state.processor_connection_health.read().await {
Expand All @@ -60,7 +60,7 @@ pub async fn server(

let app = prepare_app(
Router::new()
.route("/live", get(live))
.route("/", get(root))
.route("/health", get(health)),
);
let app = app.with_state(Arc::new(app_state));
Expand Down

0 comments on commit 3869b07

Please sign in to comment.