summaryrefslogtreecommitdiff
path: root/examples/test.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-04-21 13:10:41 +0200
committerAlex Auvolat <alex@adnab.me>2023-04-21 13:10:41 +0200
commit45e12c3bcd1198bdfce3a4f7f000ef4177067a5c (patch)
tree603808716ac2fb6b6b639acdcefe6e76fc48e3b6 /examples/test.rs
parenta11ed03031cb59b412950d62960fc27cf919e2bf (diff)
downloaddf-consul-45e12c3bcd1198bdfce3a4f7f000ef4177067a5c.tar.gz
df-consul-45e12c3bcd1198bdfce3a4f7f000ef4177067a5c.zip
add kv_get_prefixv0.3.4
Diffstat (limited to 'examples/test.rs')
-rw-r--r--examples/test.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/test.rs b/examples/test.rs
index 7e38c66..111c8c8 100644
--- a/examples/test.rs
+++ b/examples/test.rs
@@ -45,4 +45,19 @@ async fn main() {
.unwrap()
);
}
+
+ println!("== LIST PREFIX ==");
+ let prefix = consul
+ .kv_get_prefix("diplonat/autodiscovery", None)
+ .await
+ .unwrap();
+ println!("{:?}", prefix);
+ for i in 0..3 {
+ println!("-- wait for update... --");
+ let prefix = consul
+ .kv_get_prefix("diplonat/autodiscovery", Some(prefix.index()))
+ .await
+ .unwrap();
+ println!("{:?}", prefix);
+ }
}