aboutsummaryrefslogtreecommitdiff
path: root/src/consul_actor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/consul_actor.rs')
-rw-r--r--src/consul_actor.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/consul_actor.rs b/src/consul_actor.rs
index c87874d..b26c2dd 100644
--- a/src/consul_actor.rs
+++ b/src/consul_actor.rs
@@ -23,7 +23,7 @@ fn retry_to_time(retries: u32, max_time: Duration) -> Duration {
}
impl ConsulActor {
- fn new(url: &str, node: &str) -> Self {
+ pub fn new(url: &str, node: &str) -> Self {
let (tx, rx) = watch::channel(messages::OpenPorts{ports: Vec::new() });
return Self {
consul: Consul::new(url),
@@ -34,7 +34,7 @@ impl ConsulActor {
};
}
- async fn listen(&mut self) -> Result<()> {
+ pub async fn listen(&mut self) -> Result<()> {
loop {
let catalog = match self.consul.watch_node(&self.node).await {
Ok(c) => c,
@@ -46,6 +46,8 @@ impl ConsulActor {
continue;
}
};
+
+ info!("{:#?}", catalog);
}
}
}