added: feature flags
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user