Skip to content

Commit

Permalink
兼容nacos-sdk-csharp中的grpc发布配置接口; #162
Browse files Browse the repository at this point in the history
  • Loading branch information
heqingpan committed Nov 10, 2024
1 parent 303c331 commit 3bd7d94
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/grpc/api_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,17 @@ pub struct ConfigPublishRequest {
pub tenant: String,
pub content: Arc<String>,
pub cas_md5: Option<String>,
pub addition_map: Option<HashMap<String, String>>,
pub addition_map: Option<HashMap<String, Option<String>>>,
}

impl ConfigPublishRequest {
pub fn get_addition_param(&self, key: &str) -> Option<&String> {
if let Some(addition_map) = self.addition_map.as_ref() {
addition_map.get(key)
if let Some(v) = addition_map.get(key) {
v.as_ref()
} else {
None
}
} else {
None
}
Expand Down

0 comments on commit 3bd7d94

Please sign in to comment.