aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-04-21 13:55:59 +0200
committerAlex Auvolat <alex@adnab.me>2023-04-21 13:55:59 +0200
commit6d0cb99b998a3a04562fa55d0a68cdda733e81cc (patch)
tree01e1d54e9b1e81f83ba89ae7db16018945abaab2 /src
parentfb7fde4b09df090f30ded5be4fbc094022aeff7a (diff)
downloadD53-6d0cb99b998a3a04562fa55d0a68cdda733e81cc.tar.gz
D53-6d0cb99b998a3a04562fa55d0a68cdda733e81cc.zip
fix regex, add debug
Diffstat (limited to 'src')
-rw-r--r--src/autodiscovery.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/autodiscovery.rs b/src/autodiscovery.rs
index 9fcc094..7b61da6 100644
--- a/src/autodiscovery.rs
+++ b/src/autodiscovery.rs
@@ -33,7 +33,7 @@ pub fn watch_autodiscovered_ips(
tokio::spawn(async move {
let mut last_index = None;
- let re = Regex::new(r".*autodiscovery/(\w+)/(\w+)$").unwrap();
+ let re = Regex::new(r".*autodiscovery/(ipv[46])/([^/]+)$").unwrap();
while !*must_exit.borrow() {
let r = select! {
@@ -66,6 +66,7 @@ pub fn watch_autodiscovered_ips(
}
}
+ debug!("Autodiscovered addresses fetched from Consul: {:?}", addresses);
if tx.send(Arc::new(addresses)).is_err() {
info!("Autodiscovered addresses watcher terminating");
}