aboutsummaryrefslogtreecommitdiff
path: root/src/node_state.rs
blob: ecf7484577468a97620473fa787d5e6de79d2fd4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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()
    };
  }
}