aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2020-05-09 16:50:38 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2020-05-09 16:50:38 +0200
commit00c20390343655c8d43212959a811618bb5072d7 (patch)
treeb997e3e758dfb00923b9f322d7084fc7ee45ef19 /src/main.rs
parent79102ba463204721bccad8086a059adaf510c838 (diff)
downloaddiplonat-00c20390343655c8d43212959a811618bb5072d7.tar.gz
diplonat-00c20390343655c8d43212959a811618bb5072d7.zip
Rewrite as an object
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs18
1 files changed, 9 insertions, 9 deletions
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)