aboutsummaryrefslogtreecommitdiff
path: root/src/node_state.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2020-05-21 22:25:33 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2020-05-21 22:25:33 +0200
commit8c43611eb5bbaeb42f19da8d8ed521df208bfada (patch)
treec207e950744f451424e139e97aaf852c2d8ff949 /src/node_state.rs
parent4da459ce8ba49f98084a8ce32f600470ff883ec5 (diff)
downloaddiplonat-8c43611eb5bbaeb42f19da8d8ed521df208bfada.tar.gz
diplonat-8c43611eb5bbaeb42f19da8d8ed521df208bfada.zip
Broken Diplonat
Diffstat (limited to 'src/node_state.rs')
-rw-r--r--src/node_state.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/node_state.rs b/src/node_state.rs
new file mode 100644
index 0000000..ecf7484
--- /dev/null
+++ b/src/node_state.rs
@@ -0,0 +1,25 @@
+pub struct NodeState {
+ pub consul_node_name: Option<String>,
+ pub consul_url: Option<String>,
+
+ pub refresh_time: Option<u32>,
+ pub expiration_time: Option<u32>,
+
+ pub public_ip: Option<String>,
+ pub private_ip: Option<String>,
+ pub public_ports: Vec<u16>,
+}
+
+impl NodeState {
+ pub fn new() -> Self {
+ return Self {
+ consul_node_name: None,
+ consul_url: None,
+ refresh_time: None,
+ expiration_time: None,
+ public_ip: None,
+ private_ip: None,
+ public_ports: Vec::new()
+ };
+ }
+}