diff options
Diffstat (limited to 'src/consul.rs')
-rw-r--r-- | src/consul.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/consul.rs b/src/consul.rs index 01dff46..1bb30aa 100644 --- a/src/consul.rs +++ b/src/consul.rs @@ -27,6 +27,10 @@ impl Consul { }; } + 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 { Some(i) => format!("{}/v1/catalog/node/{}?index={}", self.url, host, i), |