()
| 18 | |
| 19 | impl Config { |
| 20 | pub fn new() -> Config { |
| 21 | |
| 22 | let mut node_addr = String::from(DEFAULT_NODE_ADDR); |
| 23 | if let Ok(addr) = env::var("NODE_ADDRESS") { |
| 24 | node_addr = addr; |
| 25 | } |
| 26 | let mut map = HashMap::new(); |
| 27 | map.insert(String::from(NODE_ADDRESS_KEY), node_addr); |
| 28 | |
| 29 | Config { |
| 30 | inner: RwLock::new(map), |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | |
| 35 | pub fn get_node_addr(&self) -> String { |
nothing calls this directly
no outgoing calls
no test coverage detected