summaryrefslogtreecommitdiff
path: root/examples/test.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/test.rs')
-rw-r--r--examples/test.rs13
1 files changed, 4 insertions, 9 deletions
diff --git a/examples/test.rs b/examples/test.rs
index b3e6455..7e38c66 100644
--- a/examples/test.rs
+++ b/examples/test.rs
@@ -1,7 +1,11 @@
+use std::time::Duration;
+
use df_consul::*;
#[tokio::main]
async fn main() {
+ pretty_env_logger::init();
+
let config = Config {
addr: "http://localhost:8500".into(),
ca_cert: None,
@@ -41,13 +45,4 @@ async fn main() {
.unwrap()
);
}
-
- println!("== WATCHING EVERYTHING ==");
- let mut watch = consul.watch_all_service_health();
- loop {
- if watch.changed().await.is_err() {
- break;
- }
- println!("\n{:?}", watch.borrow_and_update());
- }
}