From 45e12c3bcd1198bdfce3a4f7f000ef4177067a5c Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 21 Apr 2023 13:10:41 +0200 Subject: add kv_get_prefix --- examples/test.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'examples') 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); + } } -- cgit v1.2.3