added: feature flags

This commit is contained in:
2022-11-30 15:06:54 +01:00
parent 117cb6bc5e
commit c70b09baa4
2 changed files with 11 additions and 4 deletions

View File

@@ -21,6 +21,7 @@ use ssh_key::{Certificate, PublicKey};
use tokio::sync::Mutex;
use tower::ServiceBuilder;
use tower_http::ServiceBuilderExt;
use tracing::debug;
use self::extract::CertificateBody;
@@ -87,7 +88,7 @@ pub async fn run(
tokio::spawn(async move {
loop {
tokio::time::sleep(Duration::from_secs(30)).await;
tokio::time::sleep(std::time::Duration::from_secs(30)).await;
if let Ok(certs) = read_certs(&state.ca, &state.cert_dir).await {
*state.certs.lock().await = certs
.into_iter()
@@ -108,7 +109,7 @@ pub async fn run(
// run our app with hyper
// `axum::Server` is a re-export of `hyper::Server`
tracing::debug!("listening on {}", address);
debug!("listening on {}", address);
axum::Server::bind(&address)
.serve(app.into_make_service())
.await