summaryrefslogtreecommitdiff
path: root/angelsharkd/src
diff options
context:
space:
mode:
authorCarpenter, Adam (CORP) <adam.carpenter@adp.com>2021-11-26 11:58:06 -0500
committerCarpenter, Adam (CORP) <adam.carpenter@adp.com>2021-11-26 11:58:06 -0500
commitf7a3a38385a56841494e8c0cb9f67406090d8121 (patch)
treee58be10ea891d5f675433dd4dab53903f6a0d23f /angelsharkd/src
parent9a940e64d55c4144fb65c702241eeac99a426bd1 (diff)
downloadaltruistic-angelshark-f7a3a38385a56841494e8c0cb9f67406090d8121.tar.xz
altruistic-angelshark-f7a3a38385a56841494e8c0cb9f67406090d8121.zip
feat: scaffold feature switch route extension hierarchy
Diffstat (limited to 'angelsharkd/src')
-rw-r--r--angelsharkd/src/main.rs3
-rw-r--r--angelsharkd/src/routes/mod.rs2
2 files changed, 5 insertions, 0 deletions
diff --git a/angelsharkd/src/main.rs b/angelsharkd/src/main.rs
index 8a8a53e..fb075ab 100644
--- a/angelsharkd/src/main.rs
+++ b/angelsharkd/src/main.rs
@@ -41,6 +41,9 @@ async fn main() -> Result<()> {
})
.with(warp::log("angelsharkd"));
+ #[cfg(feature = "extensions")]
+ let routes = routes.or(routes::extensions::filter(&config));
+
// Create server with shutdown signal.
let (addr, server) = warp::serve(routes).bind_with_graceful_shutdown(config.bind_addr, async {
signal::ctrl_c()
diff --git a/angelsharkd/src/routes/mod.rs b/angelsharkd/src/routes/mod.rs
index 40d024d..52373d6 100644
--- a/angelsharkd/src/routes/mod.rs
+++ b/angelsharkd/src/routes/mod.rs
@@ -13,6 +13,8 @@ use warp::{
};
mod dtos;
+#[cfg(feature = "extensions")]
+pub mod extensions;
/// GET / -> Name and version # of app.
pub fn index() -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone {