diff options
author | adrien <adrien@luxeylab.net> | 2021-12-28 11:56:12 +0100 |
---|---|---|
committer | adrien <adrien@luxeylab.net> | 2021-12-28 11:56:12 +0100 |
commit | 4560622fa125afb8ac5161f8d0e8a353f99f7a38 (patch) | |
tree | 0e6b8c716955ea5bb5896c5dc4c8294b69e54137 /src/consul.rs | |
parent | 4d4d453afa3edafe71db2ae60171b8696b38a3c9 (diff) | |
parent | 7760b9c58fd98dd934a8f553dd7462049f545cf4 (diff) | |
download | diplonat-4560622fa125afb8ac5161f8d0e8a353f99f7a38.tar.gz diplonat-4560622fa125afb8ac5161f8d0e8a353f99f7a38.zip |
Merge pull request 'Allow Diplonat to automatically detect it's private IP' (#12) from autodetect-private-ip into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/diplonat/pulls/12
Diffstat (limited to 'src/consul.rs')
-rw-r--r-- | src/consul.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/consul.rs b/src/consul.rs index 4e6fe5d..4e4f79c 100644 --- a/src/consul.rs +++ b/src/consul.rs @@ -25,10 +25,12 @@ impl Consul { client: reqwest::Client::new(), url: url.to_string(), idx: None, - } + }; } - pub fn watch_node_reset(&mut self) -> () { self.idx = None; } + pub fn watch_node_reset(&mut self) -> () { + self.idx = None; + } pub async fn watch_node(&mut self, host: &str) -> Result<CatalogNode> { let url = match self.idx { @@ -43,6 +45,6 @@ impl Consul { }; let resp: CatalogNode = http.json().await?; - return Ok(resp) + return Ok(resp); } } |