26 lines
538 B
Rust
26 lines
538 B
Rust
|
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()
|
||
|
};
|
||
|
}
|
||
|
}
|