aboutsummaryrefslogtreecommitdiff
path: root/src/diplonat.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/diplonat.rs')
-rw-r--r--src/diplonat.rs22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/diplonat.rs b/src/diplonat.rs
index 7049530..a17bdc0 100644
--- a/src/diplonat.rs
+++ b/src/diplonat.rs
@@ -16,25 +16,23 @@ impl Diplonat {
pub async fn new() -> Result<Self> {
let rt_cfg = ConfigOpts::from_env()?;
println!("{:#?}", rt_cfg);
-
+
let ca = ConsulActor::new(&rt_cfg.consul.url, &rt_cfg.consul.node_name);
- let fw = FirewallActor::new(
- rt_cfg.firewall.refresh_time,
- &ca.rx_open_ports
- ).await?;
-
+ let fw = FirewallActor::new(rt_cfg.firewall.refresh_time, &ca.rx_open_ports).await?;
+
let ia = IgdActor::new(
- &rt_cfg.igd.private_ip,
- rt_cfg.igd.refresh_time,
- rt_cfg.igd.expiration_time,
- &ca.rx_open_ports
- ).await?;
+ &rt_cfg.igd.private_ip,
+ rt_cfg.igd.refresh_time,
+ rt_cfg.igd.expiration_time,
+ &ca.rx_open_ports,
+ )
+ .await?;
let ctx = Self {
consul: ca,
igd: ia,
- firewall: fw
+ firewall: fw,
};
return Ok(ctx);