From c350c1bcaa3520352818e6b894404e98fb5eb1b4 Mon Sep 17 00:00:00 2001 From: CherishCai <785427346@qq.com> Date: Tue, 12 Mar 2024 13:39:21 +0800 Subject: [PATCH] bump: version=0.3.5 --- Cargo.toml | 4 ++-- README.md | 3 +++ src/lib.rs | 5 +++++ src/naming.rs | 3 ++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a3523e7..a9bd7fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nacos-sdk-rust-binding-py" -version = "0.3.3" +version = "0.3.5" edition = "2021" license = "Apache-2.0" publish = false @@ -20,7 +20,7 @@ doc = false [dependencies] pyo3 = "0.18" -nacos-sdk = { version = "0.3.3", features = ["default"] } +nacos-sdk = { version = "0.3.5", features = ["default"] } #nacos-sdk = { git = "https://github.com/nacos-group/nacos-sdk-rust.git", features = ["default"] } tracing-subscriber = { version = "0.3", features = ["default"] } diff --git a/README.md b/README.md index 1b9af0e..86b4fc8 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,9 @@ class ClientOptions: # naming push_empty_protection, default true #[pyo3(set, get)] naming_push_empty_protection: Option, + # naming load_cache_at_start, default false + #[pyo3(set, get)] + naming_load_cache_at_start: Option, # Init def __init__(self, server_addr, namespace, app_name, username, password): diff --git a/src/lib.rs b/src/lib.rs index cbdb02b..7a32ee9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -73,6 +73,9 @@ pub struct ClientOptions { /// naming push_empty_protection, default true #[pyo3(set, get)] pub naming_push_empty_protection: Option, + /// naming load_cache_at_start, default false + #[pyo3(set, get)] + pub naming_load_cache_at_start: Option, } #[pymethods] @@ -85,6 +88,7 @@ impl ClientOptions { username: Option, password: Option, naming_push_empty_protection: Option, + naming_load_cache_at_start: Option, ) -> PyResult { Ok(Self { server_addr, @@ -93,6 +97,7 @@ impl ClientOptions { username, password, naming_push_empty_protection, + naming_load_cache_at_start, }) } } diff --git a/src/naming.rs b/src/naming.rs index 07c2940..7d818f3 100644 --- a/src/naming.rs +++ b/src/naming.rs @@ -29,7 +29,8 @@ impl NacosNamingClient { ) .naming_push_empty_protection( client_options.naming_push_empty_protection.unwrap_or(true), - ); + ) + .naming_load_cache_at_start(client_options.naming_load_cache_at_start.unwrap_or(false)); // need enable_auth_plugin_http with username & password let is_enable_auth = client_options.username.is_some() && client_options.password.is_some();