diff options
author | Alex Auvolat <alex@adnab.me> | 2021-12-06 23:08:22 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-12-06 23:08:22 +0100 |
commit | 2895a8ae2e99f11290800c14f038feda90e1787a (patch) | |
tree | 927ce24939b08613f74b9354456308f69286cfb7 /src/main.rs | |
download | tricot-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.rs | 20 |
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()); + } +} |