aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/main.rs b/src/main.rs
index 84acca1..7a33bab 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -4,8 +4,7 @@ use std::net::SocketAddrV4;
use igd::aio::search_gateway;
use igd::PortMappingProtocol;
-use consul::catalog::Catalog;
-use consul::{Client, Config};
+use std::collections::HashMap;
struct DiplonatConfig {
private_ip: String,
@@ -58,13 +57,12 @@ async fn main() {
Err(e) => return println!("unable to build configuration: {}", e),
};
- let consul_config = Config::new().unwrap();
- let consul_client = Client::new(consul_config);
-
- match consul_client.nodes(None) {
- Ok(v) => println!("ok: {:?}", v),
- Err(err) => println!("err: {}", err),
- };
+ let resp = reqwest::get("http://127.0.0.1:5000")
+ .await
+ .unwrap()
+ .json::<HashMap<String, String>>()
+ .await.unwrap();
+ println!("{:#?}", resp);
let gateway = match search_gateway(Default::default()).await {
Ok(g) => g,