I am trying to make some blocking calls against the key value store to keep a watch on a value.
This means I need to make requests with the index Blocking feature set.
I am using the below
https://docs.rs/consulrs/latest/consulrs/api/features/struct.Blocking.html
https://docs.rs/consulrs/latest/consulrs/api/struct.ApiResponse.html
let mut res = consulrs::kv::read(
&consul_client,
&key,
Some(
ReadKeyRequestBuilder::default()
.key(&key)
.features(
consulrs::api::features::Features {
blocking: Some(consulrs::api::features::Blocking {
index:my_index,
wait: Some("500s".to_string()),
}),
..consulrs::api::features::Features::default()
}
)
.recurse(false),
),
)
.await;
Is there an easier way to do this without having to convert the index to a string or u64 in the request response loop.
I am trying to make some blocking calls against the key value store to keep a watch on a value.
This means I need to make requests with the index Blocking feature set.
I am using the below
https://docs.rs/consulrs/latest/consulrs/api/features/struct.Blocking.html
https://docs.rs/consulrs/latest/consulrs/api/struct.ApiResponse.html
Is there an easier way to do this without having to convert the index to a string or u64 in the request response loop.