Skip to content

Commit

Permalink
feat: crate name change to nacos-sdk (#7)
Browse files Browse the repository at this point in the history
* feat: crate name change to nacos-sdk

* fix: CHANGELOG.md

* fix: invalid length 7, expected at most 5 keywords per crate

* fix: invalid length 24, expected a keyword with less than 20 characters

* upgrade: 0.1.1, exclude build.rs
  • Loading branch information
CherishCai authored Sep 25, 2022
1 parent c52de30 commit be475fc
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 18 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 变更日志 | Change log

### 0.1.1

- Config 模块基本可用
- 欢迎更多贡献、修复和标准化 api

---

- The module of Config basically available
- Welcome more contributions, fixes and standardized APIs

18 changes: 14 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,19 @@
#

[package]
name = "nacos-client"
version = "0.1.0"
name = "nacos-sdk"
version = "0.1.1"
edition = "2021"
authors = ["nacos-group", "CheirshCai <[email protected]>", "onewe <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
documentation = "https://docs.rs/nacos-sdk/latest"
repository = "https://github.com/nacos-group/nacos-sdk-rust"
homepage = "https://nacos.io/en-us/"
description = "Nacos client in Rust."
categories = ["network-programming", "development-tools"]
keywords = ["microservices", "config", "naming", "service-discovery", "config-management"]
exclude = [".github", "proto", "build.rs"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
Expand All @@ -30,7 +40,7 @@ naming = []
[dependencies]
thiserror = "1.0"
tokio = { version = "1.21", features = ["full"] }
tokio-stream = { version = "0.1", features = ["net"] }
#tokio-stream = { version = "0.1", features = ["net"] }
futures = "0.3"
grpcio = { version = "0.11", default-features = false, features = ["prost-codec"] }
prost = "0.10"
Expand All @@ -43,7 +53,7 @@ lazy_static = "1.4"
#async-trait = "0"
#async_once = "0"

opentelemetry = "0"
#opentelemetry = "0"
tracing = "0.1"
local_ipaddress = "0.1.3"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Add the dependency in `Cargo.toml`:

```toml
[dependencies]
nacos-client = { version = "0.1.0", features = ["default"] }
nacos-sdk = { version = "0.1", features = ["default"] }
```

### Usage of Config
Expand Down
6 changes: 3 additions & 3 deletions examples/simple_app.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use nacos_client::api::config::ConfigService;
use nacos_client::api::config::ConfigServiceBuilder;
use nacos_client::api::props::ClientProps;
use nacos_sdk::api::config::ConfigService;
use nacos_sdk::api::config::ConfigServiceBuilder;
use nacos_sdk::api::props::ClientProps;
use std::time::Duration;
use tokio::time::sleep;

Expand Down
8 changes: 4 additions & 4 deletions src/api/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ pub(crate) type ConfigChangeListener = dyn Fn(ConfigResponse) + Send + Sync;
/// # Examples
///
/// ```rust
/// let mut config_service = nacos_client::api::config::ConfigServiceBuilder::new(
/// nacos_client::api::props::ClientProps::new()
/// let mut config_service = nacos_sdk::api::config::ConfigServiceBuilder::new(
/// nacos_sdk::api::props::ClientProps::new()
/// .server_addr("0.0.0.0:9848")
/// // Attention! "public" is "", it is recommended to customize the namespace with clear meaning.
/// .namespace("")
Expand Down Expand Up @@ -112,8 +112,8 @@ impl ConfigResponse {
/// # Examples
///
/// ```rust
/// let mut config_service = nacos_client::api::config::ConfigServiceBuilder::new(
/// nacos_client::api::props::ClientProps::new()
/// let mut config_service = nacos_sdk::api::config::ConfigServiceBuilder::new(
/// nacos_sdk::api::props::ClientProps::new()
/// .server_addr("0.0.0.0:9848")
/// // Attention! "public" is "", it is recommended to customize the namespace with clear meaning.
/// .namespace("")
Expand Down
11 changes: 5 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
//!
//! ```toml
//! [dependencies]
//! nacos-client = { version = "0.1.0", features = ["default"] }
//! nacos-sdk = { version = "0.1", features = ["default"] }
//! ```
//!
//! ## General Configurations and Initialization
Expand All @@ -36,16 +36,15 @@
//!
//! ### Example of Config
//!
//! ```rust
//! let mut config_service = nacos_client::api::config::ConfigServiceBuilder::new(
//! nacos_client::api::props::ClientProps::new()
//! ```ignore
//! let mut config_service = nacos_sdk::api::config::ConfigServiceBuilder::new(
//! nacos_sdk::api::props::ClientProps::new()
//! .server_addr("0.0.0.0:9848")
//! // Attention! "public" is "", it is recommended to customize the namespace with clear meaning.
//! .namespace("")
//! .app_name("todo-your-app-name"),
//! )
//! .build()//.await
//! ;
//! .build().await;
//! ```
//!

Expand Down

0 comments on commit be475fc

Please sign in to comment.