diff options
author | Quentin <quentin@dufour.io> | 2021-09-17 10:06:51 +0200 |
---|---|---|
committer | Quentin <quentin@dufour.io> | 2021-09-17 10:06:51 +0200 |
commit | 2bbc9109991f8bb79a09a965a1d2779e1749b25b (patch) | |
tree | 57dcb5b115b854d651ac6f952466d4109bac2d45 /src/diplonat.rs | |
parent | fa25c54e47decf9f323ba0c614f4d9de106626d5 (diff) | |
parent | bf226d077ef2bea0567a7b36b4d25ce2d0b5191c (diff) | |
download | diplonat-2bbc9109991f8bb79a09a965a1d2779e1749b25b.tar.gz diplonat-2bbc9109991f8bb79a09a965a1d2779e1749b25b.zip |
Merge pull request 'added rustfmt, a guide about this, and a CI job to enforce code quality' (#10) from adrien/diplonat:meta/formating into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/diplonat/pulls/10
Diffstat (limited to 'src/diplonat.rs')
-rw-r--r-- | src/diplonat.rs | 22 |
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); |