Skip to content

Commit

Permalink
Deps update
Browse files Browse the repository at this point in the history
  • Loading branch information
detro committed Nov 27, 2023
1 parent 0931f89 commit 3e72508
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 29 deletions.
56 changes: 28 additions & 28 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion src/http/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,22 @@ pub async fn init(
shutdown_token: CancellationToken,
metrics: Arc<Registry>,
) {
// Assemble the HTTP Service State object, that will be passed to the routes
let state = HttpServiceState {
cs_reg,
po_reg,
lag_reg,
metrics,
};

// build our application with a route
// Setup Router
let app = Router::new()
// `GET /` goes to `root`
.route("/", get(root))
.route("/metrics", get(prometheus_metrics))
.with_state(state);

// Setup Server, with Graceful Shutdown
let server = axum::Server::bind(&listen_on)
.serve(app.into_make_service())
.with_graceful_shutdown(shutdown_token.cancelled());
Expand Down

0 comments on commit 3e72508

Please sign in to comment.