aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/consul.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-10-18 21:17:11 +0200
committerAlex Auvolat <alex@adnab.me>2022-10-18 21:17:11 +0200
commit8bc5caf7aa9bc0e27b741c68113cb7fdde2d54e6 (patch)
treebf5b64bd594972a6827ee3a6eacf5e58710c0d12 /src/rpc/consul.rs
parent2da8786f54dcf13bed51549f818a1af3bbebaa8c (diff)
downloadgarage-8bc5caf7aa9bc0e27b741c68113cb7fdde2d54e6.tar.gz
garage-8bc5caf7aa9bc0e27b741c68113cb7fdde2d54e6.zip
Fix issue with 'http(s)://' prefixconsul-tls
Diffstat (limited to 'src/rpc/consul.rs')
-rw-r--r--src/rpc/consul.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/consul.rs b/src/rpc/consul.rs
index cf050207..b1772a1a 100644
--- a/src/rpc/consul.rs
+++ b/src/rpc/consul.rs
@@ -100,8 +100,8 @@ impl ConsulDiscovery {
pub async fn get_consul_nodes(&self) -> Result<Vec<(NodeID, SocketAddr)>, ConsulError> {
let url = format!(
- "http://{}/v1/catalog/service/{}",
- self.config.consul_host, self.config.service_name
+ "{}/v1/catalog/service/{}",
+ self.config.consul_http_addr, self.config.service_name
);
let http = self.client.get(&url).send().await?;
@@ -158,7 +158,7 @@ impl ConsulDiscovery {
},
};
- let url = format!("http://{}/v1/catalog/register", self.config.consul_host);
+ let url = format!("{}/v1/catalog/register", self.config.consul_http_addr);
let http = self.client.put(&url).json(&advertisement).send().await?;
http.error_for_status()?;