From 00c20390343655c8d43212959a811618bb5072d7 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Sat, 9 May 2020 16:50:38 +0200 Subject: Rewrite as an object --- src/main.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 91074d1..fee73aa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,20 +1,20 @@ -use std::net::SocketAddrV4; -//use std::collections::HashMap; - -use log::*; - -use igd::PortMappingProtocol; - mod diplonat; mod config; mod gw; +//use std::net::SocketAddrV4; +//use std::collections::HashMap; +//use igd::PortMappingProtocol; +use log::*; +use diplonat::*; + #[tokio::main] async fn main() { pretty_env_logger::init(); + info!("Starting Diplonat"); - let ctx = diplonat::setup().await.expect("Setup failed"); - diplonat::listen(); + let diplo = Diplonat::new().await.expect("Setup failed"); + diplo.listen(); /* let url = format!("http://127.0.0.1:8500/v1/catalog/node/{}", config.consul_node_name); let resp = reqwest::get(&url) -- cgit v1.2.3