diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs index 4fee661..fe4c767 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,21 +6,19 @@ mod consul_actor; //use std::collections::HashMap; //use igd::PortMappingProtocol; use log::*; -use consul::*; +use consul_actor::*; #[tokio::main] async fn main() { - pretty_env_logger::init(); - info!("Starting Diplonat"); + pretty_env_logger::init(); + info!("Starting Diplonat"); /* let diplo = Diplonat::new().await.expect("Setup failed"); diplo.listen().await.expect("A runtime error occured"); */ - let mut c = Consul::new("http://127.0.0.1:8500"); - let cn = c.watch_node("lheureduthe").await.expect("Failed to fetch API"); - println!("{:#?}", cn); - let cn2 = c.watch_node("lheureduthe").await.expect("Failed to fetch API"); - println!("{:#?}", cn2); + + let mut ca = ConsulActor::new("http://127.0.0.1:8500", "lheureduthe"); + ca.listen().await.expect("Oooooops"); /* let gateway = match search_gateway(Default::default()).await { |