aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-12-06 23:08:22 +0100
committerAlex Auvolat <alex@adnab.me>2021-12-06 23:08:22 +0100
commit2895a8ae2e99f11290800c14f038feda90e1787a (patch)
tree927ce24939b08613f74b9354456308f69286cfb7 /src/main.rs
downloadtricot-2895a8ae2e99f11290800c14f038feda90e1787a.tar.gz
tricot-2895a8ae2e99f11290800c14f038feda90e1787a.zip
First commit to Tricot, a replacement for Traefik v1
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
new file mode 100644
index 0000000..3bd8928
--- /dev/null
+++ b/src/main.rs
@@ -0,0 +1,20 @@
+#[macro_use]
+extern crate anyhow;
+
+mod consul;
+mod proxy_config;
+
+use log::*;
+
+#[tokio::main]
+async fn main() {
+ pretty_env_logger::init();
+ info!("Starting Tricot");
+
+ let consul = consul::Consul::new("http://10.42.0.21:8500");
+ let mut rx_proxy_config = proxy_config::spawn_proxy_config_task(consul.clone(), "carcajou");
+
+ while rx_proxy_config.changed().await.is_ok() {
+ info!("Proxy config: {:#?}", *rx_proxy_config.borrow());
+ }
+}