nacos-sdk-rust-binding-node 0.3.2 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.toml +2 -2
- package/README.md +1 -1
- package/index.d.ts +2 -0
- package/package.json +15 -15
- package/src/lib.rs +2 -0
- package/src/naming.rs +2 -1
package/Cargo.toml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
edition = "2021"
|
|
3
3
|
name = "nacos-sdk-rust-binding-node"
|
|
4
|
-
version = "0.3.
|
|
4
|
+
version = "0.3.5"
|
|
5
5
|
authors = ["CheirshCai <785427346@qq.com>"]
|
|
6
6
|
license = "Apache-2.0"
|
|
7
7
|
readme = "README.md"
|
|
@@ -18,7 +18,7 @@ crate-type = ["cdylib"]
|
|
|
18
18
|
napi = { version = "2", default-features = false, features = ["napi4", "async"] }
|
|
19
19
|
napi-derive = "2"
|
|
20
20
|
|
|
21
|
-
nacos-sdk = { version = "0.3.
|
|
21
|
+
nacos-sdk = { version = "0.3.5", features = ["async"] }
|
|
22
22
|
#nacos-sdk = { git = "https://github.com/nacos-group/nacos-sdk-rust.git", branch = "main", features = ["async"] }
|
|
23
23
|
|
|
24
24
|
tracing-subscriber = { version = "0.3", features = ["default"] }
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ npm 包 -> https://www.npmjs.com/package/nacos-sdk-rust-binding-node
|
|
|
11
11
|
环境变量 `NACOS_CLIENT_LOGGER_LEVEL=INFO` 可设置日志打印级别,默认 INFO
|
|
12
12
|
- 客户端日志请在目录 `$HOME/logs/nacos/` 查看
|
|
13
13
|
|
|
14
|
-
环境变量 `NACOS_CLIENT_COMMON_THREAD_CORES=4`
|
|
14
|
+
环境变量 `NACOS_CLIENT_COMMON_THREAD_CORES=4` 可设置客户端核心线程数,默认 1
|
|
15
15
|
|
|
16
16
|
环境变量 `ENV_NACOS_CLIENT_NAMING_PUSH_EMPTY_PROTECTION=false` 可关闭 Naming 防推空保护,默认 true
|
|
17
17
|
|
package/index.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export interface ClientOptions {
|
|
|
17
17
|
password?: string
|
|
18
18
|
/** naming push_empty_protection, default true */
|
|
19
19
|
namingPushEmptyProtection?: boolean
|
|
20
|
+
/** naming load_cache_at_start, default false */
|
|
21
|
+
namingLoadCacheAtStart?: boolean
|
|
20
22
|
}
|
|
21
23
|
export interface NacosConfigResponse {
|
|
22
24
|
/** Namespace/Tenant */
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"binding",
|
|
8
8
|
"ffi"
|
|
9
9
|
],
|
|
10
|
-
"version": "0.3.
|
|
10
|
+
"version": "0.3.5",
|
|
11
11
|
"bugs": "https://github.com/opc-source/nacos-sdk-rust-binding-node/issues",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"repository": {
|
|
@@ -55,19 +55,19 @@
|
|
|
55
55
|
},
|
|
56
56
|
"packageManager": "yarn@3.4.1",
|
|
57
57
|
"optionalDependencies": {
|
|
58
|
-
"nacos-sdk-rust-binding-node-win32-x64-msvc": "0.3.
|
|
59
|
-
"nacos-sdk-rust-binding-node-darwin-x64": "0.3.
|
|
60
|
-
"nacos-sdk-rust-binding-node-linux-x64-gnu": "0.3.
|
|
61
|
-
"nacos-sdk-rust-binding-node-darwin-arm64": "0.3.
|
|
62
|
-
"nacos-sdk-rust-binding-node-android-arm64": "0.3.
|
|
63
|
-
"nacos-sdk-rust-binding-node-linux-arm64-gnu": "0.3.
|
|
64
|
-
"nacos-sdk-rust-binding-node-linux-arm64-musl": "0.3.
|
|
65
|
-
"nacos-sdk-rust-binding-node-win32-arm64-msvc": "0.3.
|
|
66
|
-
"nacos-sdk-rust-binding-node-linux-arm-gnueabihf": "0.3.
|
|
67
|
-
"nacos-sdk-rust-binding-node-linux-x64-musl": "0.3.
|
|
68
|
-
"nacos-sdk-rust-binding-node-freebsd-x64": "0.3.
|
|
69
|
-
"nacos-sdk-rust-binding-node-win32-ia32-msvc": "0.3.
|
|
70
|
-
"nacos-sdk-rust-binding-node-android-arm-eabi": "0.3.
|
|
71
|
-
"nacos-sdk-rust-binding-node-darwin-universal": "0.3.
|
|
58
|
+
"nacos-sdk-rust-binding-node-win32-x64-msvc": "0.3.5",
|
|
59
|
+
"nacos-sdk-rust-binding-node-darwin-x64": "0.3.5",
|
|
60
|
+
"nacos-sdk-rust-binding-node-linux-x64-gnu": "0.3.5",
|
|
61
|
+
"nacos-sdk-rust-binding-node-darwin-arm64": "0.3.5",
|
|
62
|
+
"nacos-sdk-rust-binding-node-android-arm64": "0.3.5",
|
|
63
|
+
"nacos-sdk-rust-binding-node-linux-arm64-gnu": "0.3.5",
|
|
64
|
+
"nacos-sdk-rust-binding-node-linux-arm64-musl": "0.3.5",
|
|
65
|
+
"nacos-sdk-rust-binding-node-win32-arm64-msvc": "0.3.5",
|
|
66
|
+
"nacos-sdk-rust-binding-node-linux-arm-gnueabihf": "0.3.5",
|
|
67
|
+
"nacos-sdk-rust-binding-node-linux-x64-musl": "0.3.5",
|
|
68
|
+
"nacos-sdk-rust-binding-node-freebsd-x64": "0.3.5",
|
|
69
|
+
"nacos-sdk-rust-binding-node-win32-ia32-msvc": "0.3.5",
|
|
70
|
+
"nacos-sdk-rust-binding-node-android-arm-eabi": "0.3.5",
|
|
71
|
+
"nacos-sdk-rust-binding-node-darwin-universal": "0.3.5"
|
|
72
72
|
}
|
|
73
73
|
}
|
package/src/lib.rs
CHANGED
|
@@ -56,6 +56,8 @@ pub struct ClientOptions {
|
|
|
56
56
|
pub password: Option<String>,
|
|
57
57
|
/// naming push_empty_protection, default true
|
|
58
58
|
pub naming_push_empty_protection: Option<bool>,
|
|
59
|
+
/// naming load_cache_at_start, default false
|
|
60
|
+
pub naming_load_cache_at_start: Option<bool>,
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
mod config;
|
package/src/naming.rs
CHANGED
|
@@ -25,7 +25,8 @@ impl NacosNamingClient {
|
|
|
25
25
|
.app_name
|
|
26
26
|
.unwrap_or(nacos_sdk::api::constants::UNKNOWN.to_string()),
|
|
27
27
|
)
|
|
28
|
-
.naming_push_empty_protection(client_options.naming_push_empty_protection.unwrap_or(true))
|
|
28
|
+
.naming_push_empty_protection(client_options.naming_push_empty_protection.unwrap_or(true))
|
|
29
|
+
.naming_load_cache_at_start(client_options.naming_load_cache_at_start.unwrap_or(false));
|
|
29
30
|
|
|
30
31
|
// need enable_auth_plugin_http with username & password
|
|
31
32
|
let is_enable_auth = client_options.username.is_some() && client_options.password.is_some();
|