From 04bdd029fefbce08184c12809b5d6e4bf2a12fa1 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 30 Dec 2021 20:42:56 +0100 Subject: Add TLS support for Consul --- src/consul_actor.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/consul_actor.rs') diff --git a/src/consul_actor.rs b/src/consul_actor.rs index 61789ca..8b722b6 100644 --- a/src/consul_actor.rs +++ b/src/consul_actor.rs @@ -6,6 +6,7 @@ use serde::{Deserialize, Serialize}; use serde_lexpr::{error, from_str}; use tokio::{sync::watch, time::sleep}; +use crate::config::RuntimeConfigConsul; use crate::{consul, messages}; #[derive(Serialize, Deserialize, Debug)] @@ -74,14 +75,14 @@ fn to_open_ports(params: &Vec) -> messages::PublicExposedPorts { } impl ConsulActor { - pub fn new(url: &str, node: &str) -> Self { + pub fn new(config: &RuntimeConfigConsul, node: &str) -> Self { let (tx, rx) = watch::channel(messages::PublicExposedPorts { tcp_ports: HashSet::new(), udp_ports: HashSet::new(), }); return Self { - consul: consul::Consul::new(url), + consul: consul::Consul::new(config), rx_open_ports: rx, tx_open_ports: tx, node: node.to_string(), -- cgit v1.2.3