Skip to content

Commit 5072059

Browse files
committed
bump: nacos-sdk=0.4.0
1 parent 6964ace commit 5072059

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
edition = "2021"
33
name = "nacos-sdk-rust-binding-node"
4-
version = "0.3.7-alpha"
4+
version = "0.4.0"
55
authors = ["CheirshCai <[email protected]>"]
66
license = "Apache-2.0"
77
readme = "README.md"
@@ -18,8 +18,8 @@ crate-type = ["cdylib"]
1818
napi = { version = "2", default-features = false, features = ["napi4", "async"] }
1919
napi-derive = "2"
2020

21-
nacos-sdk = { version = "0.3.6", features = ["async"] }
22-
#nacos-sdk = { git = "https://github.com/nacos-group/nacos-sdk-rust.git", branch = "main", features = ["async"] }
21+
nacos-sdk = { version = "0.4.0", features = ["default"] }
22+
#nacos-sdk = { git = "https://github.com/nacos-group/nacos-sdk-rust.git", branch = "main", features = ["default"] }
2323

2424
tracing-subscriber = { version = "0.3", features = ["default"] }
2525
#tracing-subscriber = { version = "0.3", features = ["env-filter", "local-time"] } # occur `<unknown time>`

example/config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ const { NacosConfigClient, NacosConfigResponse } = require('../index')
66
// 请注意!一般情况下,应用下仅需一个 Config 客户端,而且需要长期持有直至应用停止。
77
// 因为它内部会初始化与服务端的长链接,后续的数据交互及变更订阅,都是实时地通过长链接告知客户端的。
88
const nacos_config_client = new NacosConfigClient({
9-
serverAddr: '0.0.0.0:8848',
10-
namespace: "hongwen",
9+
serverAddr: '127.0.0.1:8848',
10+
namespace: "love",
1111
appName: "binding-node-example-app"
1212
});
1313

1414
try {
1515
// If it fails, pay attention to err
16-
nacos_config_client.getConfig('hongwen.properties', 'LOVE').then(data => {
16+
nacos_config_client.getConfig('todo-dataid', 'LOVE').then(data => {
1717
console.log('getConfig => ' + data);
1818
});
1919

20-
nacos_config_client.getConfigResp('hongwen.properties', 'LOVE').then(data => {
20+
nacos_config_client.getConfigResp('todo-dataid', 'LOVE').then(data => {
2121
console.log('getConfigResp => ' + JSON.stringify(data));
2222
});
2323
} catch(e) {
2424
console.log(e);
2525
}
2626

27-
nacos_config_client.addListener('hongwen.properties', 'LOVE', (err, config_resp) => { console.log(config_resp) });
27+
nacos_config_client.addListener('todo-dataid', 'LOVE', (err, config_resp) => { console.log(config_resp) });

example/config_decrypt.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const { NacosConfigClient, NacosConfigResponse } = require('../index')
88
const nacos_config_client = new NacosConfigClient(
99
{
1010
serverAddr: '127.0.0.1:8848',
11-
namespace: "hongwen",
11+
namespace: "love",
1212
appName: "binding-node-example-app"
1313
},
1414
(err, config_req, config_resp) => {
@@ -29,15 +29,15 @@ const nacos_config_client = new NacosConfigClient(
2929

3030
try {
3131
// If it fails, pay attention to err
32-
nacos_config_client.getConfig('hongwen.properties', 'LOVE').then(data => {
32+
nacos_config_client.getConfig('todo-dataid', 'LOVE').then(data => {
3333
console.log('getConfig => ' + data);
3434
});
3535

36-
nacos_config_client.getConfigResp('hongwen.properties', 'LOVE').then((data) => {
36+
nacos_config_client.getConfigResp('todo-dataid', 'LOVE').then((data) => {
3737
console.log('getConfigResp => ' + JSON.stringify(data));
3838
});
3939
} catch(e) {
4040
console.log(e);
4141
}
4242

43-
nacos_config_client.addListener('hongwen.properties', 'LOVE', (err, config_resp) => { console.log(config_resp) });
43+
nacos_config_client.addListener('todo-dataid', 'LOVE', (err, config_resp) => { console.log(config_resp) });

example/naming.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const { NacosNamingClient, NacosServiceInstance } = require('../index')
66
// 请注意!一般情况下,应用下仅需一个 Naming 客户端,而且需要长期持有直至应用停止。
77
// 因为它内部会初始化与服务端的长链接,后续的数据交互及变更订阅,都是实时地通过长链接告知客户端的。
88
const nacos_naming_client = new NacosNamingClient({
9-
serverAddr: '0.0.0.0:8848',
10-
namespace: "hongwen",
9+
serverAddr: '127.0.0.1:8848',
10+
namespace: "love",
1111
appName: "binding-node-example-app"
1212
});
1313

0 commit comments

Comments
 (0)