aboutsummaryrefslogtreecommitdiff
path: root/src/node_state.rs
diff options
context:
space:
mode:
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()
+ };
+ }
+}