diff options
author | Alex Auvolat <alex@adnab.me> | 2023-04-21 13:10:41 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-04-21 13:10:41 +0200 |
commit | 45e12c3bcd1198bdfce3a4f7f000ef4177067a5c (patch) | |
tree | 603808716ac2fb6b6b639acdcefe6e76fc48e3b6 /examples | |
parent | a11ed03031cb59b412950d62960fc27cf919e2bf (diff) | |
download | df-consul-45e12c3bcd1198bdfce3a4f7f000ef4177067a5c.tar.gz df-consul-45e12c3bcd1198bdfce3a4f7f000ef4177067a5c.zip |
add kv_get_prefixv0.3.4
Diffstat (limited to 'examples')
-rw-r--r-- | examples/test.rs | 15 |
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); + } } |