diff --git a/examples/configuration/main.rs b/examples/configuration/main.rs index 78779ec..506bf5a 100644 --- a/examples/configuration/main.rs +++ b/examples/configuration/main.rs @@ -20,14 +20,14 @@ async fn main() -> Result<(), Box> { // save key-value pair in the state store let response = client - .get_configuration(CONFIGSTORE_NAME, vec![(&key)]) + .get_configuration(CONFIGSTORE_NAME, vec![(&key)], None) .await?; let val = response.items.get("hello").unwrap(); println!("Configuration value: {val:?}"); // Subscribe for configuration changes let mut stream = client - .subscribe_configuration(CONFIGSTORE_NAME, vec![(&key)]) + .subscribe_configuration(CONFIGSTORE_NAME, vec![(&key)], None) .await?; let mut subscription_id = String::new(); diff --git a/src/client.rs b/src/client.rs index 412ba58..c7b2a33 100644 --- a/src/client.rs +++ b/src/client.rs @@ -311,6 +311,7 @@ impl Client { &mut self, store_name: S, keys: Vec, + metadata: Option>, ) -> Result where S: Into, @@ -319,7 +320,7 @@ impl Client { let request = GetConfigurationRequest { store_name: store_name.into(), keys: keys.into_iter().map(|key| key.into()).collect(), - metadata: Default::default(), + metadata: metadata.unwrap_or_default(), }; self.0.get_configuration(request).await } @@ -329,6 +330,7 @@ impl Client { &mut self, store_name: S, keys: Vec, + metadata: Option>, ) -> Result, Error> where S: Into, @@ -336,7 +338,7 @@ impl Client { let request = SubscribeConfigurationRequest { store_name: store_name.into(), keys: keys.into_iter().map(|key| key.into()).collect(), - metadata: Default::default(), + metadata: metadata.unwrap_or_default(), }; self.0.subscribe_configuration(request).await }