From fe1d91fe06e314faa54997638f11ae6afb57b0b5 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Fri, 22 May 2020 11:34:12 +0200 Subject: WIP consul --- README.md | 8 ++++++++ src/consul_actor.rs | 15 +++++++++++++++ src/main.rs | 1 + 3 files changed, 24 insertions(+) create mode 100644 src/consul_actor.rs diff --git a/README.md b/README.md index d656e1f..6b8e9df 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,14 @@ Diplonat * [ ] (Re)Configure nftable (prio: low) * [ ] (Re)Configure DNS via ??? (prio: low) +## Understand scope + + * Reconfigure __local__ environment when provisionning a __cluster__ service + * Reconfigure host on demand according to service needs (Firewall) + * Reconfigure host local network according to service needs (Router NAT) + * Operate a global reconfiguration that associate the tuple (__local__ environment information, a __cluster__ service) + * Reconfigure an external service with local info (DNS with public IP returned by the router via IGD) + ## Operate ```bash diff --git a/src/consul_actor.rs b/src/consul_actor.rs new file mode 100644 index 0000000..0f09851 --- /dev/null +++ b/src/consul_actor.rs @@ -0,0 +1,15 @@ +use crate::consul::Consul; +use tokio::sync::watch; + +pub struct ConsulActor { + consul: Consul + out: +} + +impl ConsulActor { + fn new(url: &str) -> Self { + return Self { + consul: Consul::new(url); + }; + } +} diff --git a/src/main.rs b/src/main.rs index 028f16e..844bff9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,5 @@ mod consul; +mod consul_actor; //use std::net::SocketAddrV4; //use std::collections::HashMap; -- cgit v1.2.3