diff options
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()); + } +} |