This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/dubbo-rust.git
The following commit(s) were added to refs/heads/main by this push:
new e61e0e8 rename creates with dubbo prefix (#131)
e61e0e8 is described below
commit e61e0e853bf7a3274fb6ae5bf0d880ca6709be82
Author: Robert Lu <[email protected]>
AuthorDate: Fri Mar 31 15:54:38 2023 +0800
rename creates with dubbo prefix (#131)
* rename with dubbo prefix
* update README.md
---
Cargo.toml | 6 +++---
common/base/Cargo.toml | 4 ++--
common/base/src/url.rs | 2 +-
common/extention/Cargo.toml | 2 +-
common/logger/Cargo.toml | 4 ++--
common/logger/src/tracing_configurer.rs | 2 +-
common/utils/Cargo.toml | 2 +-
config/Cargo.toml | 4 ++--
config/src/config.rs | 6 +++---
dubbo/Cargo.toml | 4 ++--
dubbo/README.md | 1 +
dubbo/README_CN.md | 1 +
dubbo/readme.md | 23 ----------------------
dubbo/src/cluster/directory.rs | 4 ++--
dubbo/src/cluster/loadbalance/impls/random.rs | 2 +-
dubbo/src/cluster/loadbalance/impls/roundrobin.rs | 2 +-
dubbo/src/cluster/loadbalance/types.rs | 2 +-
dubbo/src/cluster/support/cluster_invoker.rs | 2 +-
dubbo/src/context.rs | 2 +-
dubbo/src/filter/context.rs | 2 +-
dubbo/src/filter/timeout.rs | 2 +-
dubbo/src/framework.rs | 4 ++--
dubbo/src/protocol/mod.rs | 2 +-
dubbo/src/protocol/triple/triple_invoker.rs | 2 +-
dubbo/src/protocol/triple/triple_protocol.rs | 2 +-
dubbo/src/protocol/triple/triple_server.rs | 2 +-
dubbo/src/registry/memory_registry.rs | 10 +++++-----
dubbo/src/registry/mod.rs | 2 +-
dubbo/src/registry/protocol.rs | 4 ++--
dubbo/src/registry/types.rs | 4 ++--
dubbo/src/triple/decode.rs | 2 +-
dubbo/src/triple/server/builder.rs | 4 ++--
dubbo/src/triple/transport/connection.rs | 2 +-
.../triple/transport/connector/http_connector.rs | 2 +-
.../triple/transport/connector/unix_connector.rs | 2 +-
dubbo/src/triple/transport/listener/mod.rs | 2 +-
.../src/triple/transport/listener/tcp_listener.rs | 2 +-
.../src/triple/transport/listener/unix_listener.rs | 2 +-
dubbo/src/triple/transport/service.rs | 2 +-
examples/echo/Cargo.toml | 2 +-
examples/echo/src/echo/client.rs | 2 +-
examples/echo/src/echo/server.rs | 2 +-
examples/echo/src/generated/grpc.examples.echo.rs | 4 ++--
examples/greeter/Cargo.toml | 4 ++--
examples/greeter/src/greeter/client.rs | 4 ++--
examples/greeter/src/greeter/server.rs | 4 ++--
metadata/Cargo.toml | 2 +-
protocol/base/Cargo.toml | 2 +-
protocol/base/src/invoker.rs | 2 +-
protocol/triple/Cargo.toml | 2 +-
protocol/triple/src/triple_invoker.rs | 2 +-
registry/nacos/Cargo.toml | 5 +++--
registry/nacos/src/lib.rs | 4 ++--
registry/nacos/src/utils/mod.rs | 2 +-
registry/zookeeper/Cargo.toml | 4 ++--
registry/zookeeper/src/lib.rs | 4 ++--
remoting/base/Cargo.toml | 2 +-
remoting/base/src/exchange/client.rs | 2 +-
remoting/base/src/exchange/server.rs | 2 +-
remoting/net/Cargo.toml | 2 +-
remoting/net/src/incoming.rs | 2 +-
remoting/xds/Cargo.toml | 2 +-
62 files changed, 87 insertions(+), 107 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index 735eda4..5270ba4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -39,9 +39,9 @@ futures = "0.3"
serde = "1"
serde_json = "1"
urlencoding = "2.1.2"
-logger = {path="./common/logger"}
-utils = {path="./common/utils"}
-base = {path="./common/base"}
+dubbo-logger = {path="./common/logger"}
+dubbo-utils = {path="./common/utils"}
+dubbo-base = {path="./common/base"}
remoting-net = {path="./remoting/net"}
remoting-base = {path="./remoting/base"}
protocol-base = {path= "protocol/base" }
diff --git a/common/base/Cargo.toml b/common/base/Cargo.toml
index 7397c19..40579e0 100644
--- a/common/base/Cargo.toml
+++ b/common/base/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "base"
+name = "dubbo-base"
version = "0.1.0"
edition = "2021"
@@ -8,4 +8,4 @@ edition = "2021"
[dependencies]
urlencoding.workspace = true
http = "0.2"
-logger.workspace = true
\ No newline at end of file
+dubbo-logger.workspace = true
\ No newline at end of file
diff --git a/common/base/src/url.rs b/common/base/src/url.rs
index 48fbc1e..b5801bb 100644
--- a/common/base/src/url.rs
+++ b/common/base/src/url.rs
@@ -48,7 +48,7 @@ impl Url {
let uri = url
.parse::<http::Uri>()
.map_err(|err| {
- logger::tracing::error!("fail to parse url({}), err: {:?}",
url, err);
+ dubbo_logger::tracing::error!("fail to parse url({}), err:
{:?}", url, err);
})
.unwrap();
let query = uri.path_and_query().unwrap().query();
diff --git a/common/extention/Cargo.toml b/common/extention/Cargo.toml
index 9b1450c..f7c688c 100644
--- a/common/extention/Cargo.toml
+++ b/common/extention/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "extention"
+name = "dubbo-extention"
version = "0.1.0"
edition = "2021"
diff --git a/common/logger/Cargo.toml b/common/logger/Cargo.toml
index e965706..b270828 100644
--- a/common/logger/Cargo.toml
+++ b/common/logger/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "logger"
+name = "dubbo-logger"
version = "0.3.0"
edition = "2021"
@@ -9,4 +9,4 @@ edition = "2021"
tracing = "0.1"
tracing-subscriber = "0.3"
once_cell.workspace = true
-utils.workspace = true
\ No newline at end of file
+dubbo-utils.workspace = true
\ No newline at end of file
diff --git a/common/logger/src/tracing_configurer.rs
b/common/logger/src/tracing_configurer.rs
index 1e2081f..1d546c8 100644
--- a/common/logger/src/tracing_configurer.rs
+++ b/common/logger/src/tracing_configurer.rs
@@ -18,9 +18,9 @@
// https://github.com/tokio-rs/tracing/issues/971
use crate::level::LevelWrapper;
+use dubbo_utils::{path_util, yaml_util};
use std::path::PathBuf;
use tracing::debug;
-use utils::{path_util, yaml_util};
pub(crate) fn default() {
let path_buf = PathBuf::new()
diff --git a/common/utils/Cargo.toml b/common/utils/Cargo.toml
index 0b8c84f..2732b30 100644
--- a/common/utils/Cargo.toml
+++ b/common/utils/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "utils"
+name = "dubbo-utils"
version = "0.1.0"
edition = "2021"
diff --git a/config/Cargo.toml b/config/Cargo.toml
index b4e19d4..628aae8 100644
--- a/config/Cargo.toml
+++ b/config/Cargo.toml
@@ -14,5 +14,5 @@ serde = { workspace = true, features = ["derive"] }
serde_yaml.workspace = true
lazy_static.workspace = true
once_cell.workspace = true
-utils.workspace = true
-logger.workspace=true
\ No newline at end of file
+dubbo-utils.workspace = true
+dubbo-logger.workspace=true
\ No newline at end of file
diff --git a/config/src/config.rs b/config/src/config.rs
index f63b490..ba0a089 100644
--- a/config/src/config.rs
+++ b/config/src/config.rs
@@ -18,10 +18,10 @@
use std::{collections::HashMap, env, path::PathBuf};
use crate::{protocol::Protocol, registry::RegistryConfig};
-use logger::tracing;
+use dubbo_logger::tracing;
+use dubbo_utils::yaml_util::yaml_file_parser;
use once_cell::sync::OnceCell;
use serde::{Deserialize, Serialize};
-use utils::yaml_util::yaml_file_parser;
use super::{protocol::ProtocolConfig, provider::ProviderConfig,
service::ServiceConfig};
@@ -79,7 +79,7 @@ impl RootConfig {
err,
DUBBO_CONFIG_PATH
);
- utils::path_util::app_root_dir()
+ dubbo_utils::path_util::app_root_dir()
.join(DUBBO_CONFIG_PATH)
.to_str()
.unwrap()
diff --git a/dubbo/Cargo.toml b/dubbo/Cargo.toml
index a814bd0..5f79fe8 100644
--- a/dubbo/Cargo.toml
+++ b/dubbo/Cargo.toml
@@ -34,8 +34,8 @@ aws-smithy-http = "0.54.1"
itertools.workspace = true
urlencoding.workspace = true
lazy_static.workspace = true
-base.workspace = true
-logger.workspace = true
+dubbo-base.workspace = true
+dubbo-logger.workspace = true
dubbo-config = { path = "../config", version = "0.3.0" }
diff --git a/dubbo/README.md b/dubbo/README.md
new file mode 120000
index 0000000..32d46ee
--- /dev/null
+++ b/dubbo/README.md
@@ -0,0 +1 @@
+../README.md
\ No newline at end of file
diff --git a/dubbo/README_CN.md b/dubbo/README_CN.md
new file mode 120000
index 0000000..d7212ef
--- /dev/null
+++ b/dubbo/README_CN.md
@@ -0,0 +1 @@
+../README_CN.md
\ No newline at end of file
diff --git a/dubbo/readme.md b/dubbo/readme.md
deleted file mode 100644
index 8dd713d..0000000
--- a/dubbo/readme.md
+++ /dev/null
@@ -1,23 +0,0 @@
-# Introduce
-
-## Filter实现
-
-客户端Filter和服务端Filter
-将TripleClient扩展为通用的InvokerClient
-
-+ 测试客户端filter
-+ 服务端filter接口设计,以及测试
-+ 服务注册接口
-+ 服务发现接口设计
-
-EchoClient -> TripleClient -> FilterService -> Connection -> hyper::Connect
-
-
-memory registry clone实现
-将服务注册接入到framework中
-url模型如何用于多个场景
-protocol模块实现
-
-registry config(yaml) -> registry config(memory) ->
-
-Init函数初始化配置即:根据RootConfig来初始化对应的ServiceConfig
\ No newline at end of file
diff --git a/dubbo/src/cluster/directory.rs b/dubbo/src/cluster/directory.rs
index 8c2536c..e74fc6d 100644
--- a/dubbo/src/cluster/directory.rs
+++ b/dubbo/src/cluster/directory.rs
@@ -26,8 +26,8 @@ use crate::{
invocation::{Invocation, RpcInvocation},
registry::{memory_registry::MemoryNotifyListener, BoxRegistry,
RegistryWrapper},
};
-use base::Url;
-use logger::tracing;
+use dubbo_base::Url;
+use dubbo_logger::tracing;
/// Directory.
///
diff --git a/dubbo/src/cluster/loadbalance/impls/random.rs
b/dubbo/src/cluster/loadbalance/impls/random.rs
index ddfcd39..3e1cf65 100644
--- a/dubbo/src/cluster/loadbalance/impls/random.rs
+++ b/dubbo/src/cluster/loadbalance/impls/random.rs
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-use base::Url;
+use dubbo_base::Url;
use std::{
fmt::{Debug, Formatter},
sync::Arc,
diff --git a/dubbo/src/cluster/loadbalance/impls/roundrobin.rs
b/dubbo/src/cluster/loadbalance/impls/roundrobin.rs
index 0c59ed4..5fd0ed4 100644
--- a/dubbo/src/cluster/loadbalance/impls/roundrobin.rs
+++ b/dubbo/src/cluster/loadbalance/impls/roundrobin.rs
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-use base::Url;
+use dubbo_base::Url;
use std::{
collections::HashMap,
fmt::{Debug, Formatter},
diff --git a/dubbo/src/cluster/loadbalance/types.rs
b/dubbo/src/cluster/loadbalance/types.rs
index fd48ed9..9273d07 100644
--- a/dubbo/src/cluster/loadbalance/types.rs
+++ b/dubbo/src/cluster/loadbalance/types.rs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-use base::Url;
+use dubbo_base::Url;
use std::{fmt::Debug, sync::Arc};
use crate::codegen::RpcInvocation;
diff --git a/dubbo/src/cluster/support/cluster_invoker.rs
b/dubbo/src/cluster/support/cluster_invoker.rs
index 67c9839..0ccca48 100644
--- a/dubbo/src/cluster/support/cluster_invoker.rs
+++ b/dubbo/src/cluster/support/cluster_invoker.rs
@@ -18,7 +18,7 @@
use aws_smithy_http::body::SdkBody;
use std::{str::FromStr, sync::Arc};
-use base::Url;
+use dubbo_base::Url;
use http::{uri::PathAndQuery, Request};
use crate::{
diff --git a/dubbo/src/context.rs b/dubbo/src/context.rs
index e94eb26..268dee0 100644
--- a/dubbo/src/context.rs
+++ b/dubbo/src/context.rs
@@ -21,7 +21,7 @@ use std::{
thread,
};
-use logger::tracing;
+use dubbo_logger::tracing;
use serde_json::Value;
use state::Container;
diff --git a/dubbo/src/filter/context.rs b/dubbo/src/filter/context.rs
index b17168b..8551fe7 100644
--- a/dubbo/src/filter/context.rs
+++ b/dubbo/src/filter/context.rs
@@ -17,7 +17,7 @@
use std::time::{SystemTime, UNIX_EPOCH};
-use logger::tracing;
+use dubbo_logger::tracing;
use serde_json::Value;
use crate::{
diff --git a/dubbo/src/filter/timeout.rs b/dubbo/src/filter/timeout.rs
index ea14183..f007665 100644
--- a/dubbo/src/filter/timeout.rs
+++ b/dubbo/src/filter/timeout.rs
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-use logger::tracing;
+use dubbo_logger::tracing;
use std::time::{SystemTime, UNIX_EPOCH};
use crate::{
diff --git a/dubbo/src/framework.rs b/dubbo/src/framework.rs
index f91ee43..d595f38 100644
--- a/dubbo/src/framework.rs
+++ b/dubbo/src/framework.rs
@@ -30,10 +30,10 @@ use crate::{
BoxRegistry, Registry,
},
};
-use base::Url;
+use dubbo_base::Url;
use dubbo_config::{get_global_config, protocol::ProtocolRetrieve, RootConfig};
+use dubbo_logger::tracing;
use futures::{future, Future};
-use logger::tracing;
// Invoker是否可以基于hyper写一个通用的
diff --git a/dubbo/src/protocol/mod.rs b/dubbo/src/protocol/mod.rs
index 886308d..58dca5f 100644
--- a/dubbo/src/protocol/mod.rs
+++ b/dubbo/src/protocol/mod.rs
@@ -25,7 +25,7 @@ use async_trait::async_trait;
use aws_smithy_http::body::SdkBody;
use tower_service::Service;
-use base::Url;
+use dubbo_base::Url;
pub mod server_desc;
pub mod triple;
diff --git a/dubbo/src/protocol/triple/triple_invoker.rs
b/dubbo/src/protocol/triple/triple_invoker.rs
index d7d54ee..6139cc9 100644
--- a/dubbo/src/protocol/triple/triple_invoker.rs
+++ b/dubbo/src/protocol/triple/triple_invoker.rs
@@ -16,7 +16,7 @@
*/
use aws_smithy_http::body::SdkBody;
-use base::Url;
+use dubbo_base::Url;
use std::fmt::{Debug, Formatter};
use tower_service::Service;
diff --git a/dubbo/src/protocol/triple/triple_protocol.rs
b/dubbo/src/protocol/triple/triple_protocol.rs
index fd1d369..71f6edc 100644
--- a/dubbo/src/protocol/triple/triple_protocol.rs
+++ b/dubbo/src/protocol/triple/triple_protocol.rs
@@ -18,7 +18,7 @@
use std::{boxed::Box, collections::HashMap};
use async_trait::async_trait;
-use base::Url;
+use dubbo_base::Url;
use super::{
triple_exporter::TripleExporter, triple_invoker::TripleInvoker,
triple_server::TripleServer,
diff --git a/dubbo/src/protocol/triple/triple_server.rs
b/dubbo/src/protocol/triple/triple_server.rs
index 1db27fa..89f959c 100644
--- a/dubbo/src/protocol/triple/triple_server.rs
+++ b/dubbo/src/protocol/triple/triple_server.rs
@@ -16,7 +16,7 @@
*/
use crate::triple::server::builder::ServerBuilder;
-use base::Url;
+use dubbo_base::Url;
#[derive(Default, Clone)]
pub struct TripleServer {
diff --git a/dubbo/src/registry/memory_registry.rs
b/dubbo/src/registry/memory_registry.rs
index 38d08e2..db878d6 100644
--- a/dubbo/src/registry/memory_registry.rs
+++ b/dubbo/src/registry/memory_registry.rs
@@ -17,13 +17,13 @@
#![allow(unused_variables, dead_code, missing_docs)]
-use logger::tracing::debug;
+use dubbo_logger::tracing::debug;
use std::{
collections::HashMap,
sync::{Arc, RwLock},
};
-use base::Url;
+use dubbo_base::Url;
use super::{NotifyListener, Registry, RegistryNotifyListener};
@@ -69,7 +69,7 @@ impl Registry for MemoryRegistry {
Ok(())
}
- fn unregister(&mut self, url: base::Url) -> Result<(), crate::StdError> {
+ fn unregister(&mut self, url: dubbo_base::Url) -> Result<(),
crate::StdError> {
let registry_group = match url.get_param(REGISTRY_GROUP_KEY) {
Some(key) => key,
None => "dubbo".to_string(),
@@ -88,7 +88,7 @@ impl Registry for MemoryRegistry {
fn subscribe(
&self,
- url: base::Url,
+ url: dubbo_base::Url,
listener: RegistryNotifyListener,
) -> Result<(), crate::StdError> {
todo!()
@@ -96,7 +96,7 @@ impl Registry for MemoryRegistry {
fn unsubscribe(
&self,
- url: base::Url,
+ url: dubbo_base::Url,
listener: RegistryNotifyListener,
) -> Result<(), crate::StdError> {
todo!()
diff --git a/dubbo/src/registry/mod.rs b/dubbo/src/registry/mod.rs
index c5e2674..31106f0 100644
--- a/dubbo/src/registry/mod.rs
+++ b/dubbo/src/registry/mod.rs
@@ -26,7 +26,7 @@ use std::{
sync::Arc,
};
-use base::Url;
+use dubbo_base::Url;
pub type RegistryNotifyListener = Arc<dyn NotifyListener + Send + Sync +
'static>;
pub trait Registry {
diff --git a/dubbo/src/registry/protocol.rs b/dubbo/src/registry/protocol.rs
index 4f86fd3..1250950 100644
--- a/dubbo/src/registry/protocol.rs
+++ b/dubbo/src/registry/protocol.rs
@@ -15,8 +15,8 @@
* limitations under the License.
*/
-use base::Url;
-use logger::tracing;
+use dubbo_base::Url;
+use dubbo_logger::tracing;
use std::{
collections::HashMap,
fmt::{Debug, Formatter},
diff --git a/dubbo/src/registry/types.rs b/dubbo/src/registry/types.rs
index 16b9063..ae7c7ca 100644
--- a/dubbo/src/registry/types.rs
+++ b/dubbo/src/registry/types.rs
@@ -20,9 +20,9 @@ use std::{
sync::{Arc, Mutex},
};
-use base::Url;
+use dubbo_base::Url;
+use dubbo_logger::tracing::info;
use itertools::Itertools;
-use logger::tracing::info;
use crate::{
registry::{BoxRegistry, Registry},
diff --git a/dubbo/src/triple/decode.rs b/dubbo/src/triple/decode.rs
index efdbee6..07c1160 100644
--- a/dubbo/src/triple/decode.rs
+++ b/dubbo/src/triple/decode.rs
@@ -18,9 +18,9 @@
use std::{pin::Pin, task::Poll};
use bytes::{Buf, BufMut, Bytes, BytesMut};
+use dubbo_logger::tracing;
use futures_util::{future, ready, Stream};
use http_body::Body;
-use logger::tracing;
use super::compression::{decompress, CompressionEncoding};
use crate::{
diff --git a/dubbo/src/triple/server/builder.rs
b/dubbo/src/triple/server/builder.rs
index 1623540..15a7e93 100644
--- a/dubbo/src/triple/server/builder.rs
+++ b/dubbo/src/triple/server/builder.rs
@@ -20,10 +20,10 @@ use std::{
str::FromStr,
};
-use base::Url;
+use dubbo_base::Url;
+use dubbo_logger::tracing;
use http::{Request, Response, Uri};
use hyper::body::Body;
-use logger::tracing;
use tower_service::Service;
use crate::{triple::transport::DubboServer, BoxBody};
diff --git a/dubbo/src/triple/transport/connection.rs
b/dubbo/src/triple/transport/connection.rs
index 2188f2b..1b97875 100644
--- a/dubbo/src/triple/transport/connection.rs
+++ b/dubbo/src/triple/transport/connection.rs
@@ -17,8 +17,8 @@
use std::task::Poll;
+use dubbo_logger::tracing::debug;
use hyper::client::{conn::Builder, service::Connect};
-use logger::tracing::debug;
use tower_service::Service;
use crate::{boxed, triple::transport::connector::get_connector};
diff --git a/dubbo/src/triple/transport/connector/http_connector.rs
b/dubbo/src/triple/transport/connector/http_connector.rs
index 255d64e..99c1a84 100644
--- a/dubbo/src/triple/transport/connector/http_connector.rs
+++ b/dubbo/src/triple/transport/connector/http_connector.rs
@@ -20,9 +20,9 @@ use std::{
str::FromStr,
};
+use dubbo_logger::tracing;
use http::Uri;
use hyper::client::connect::dns::Name;
-use logger::tracing;
use tokio::net::TcpStream;
use tower_service::Service;
diff --git a/dubbo/src/triple/transport/connector/unix_connector.rs
b/dubbo/src/triple/transport/connector/unix_connector.rs
index 70ceda9..1448fb9 100644
--- a/dubbo/src/triple/transport/connector/unix_connector.rs
+++ b/dubbo/src/triple/transport/connector/unix_connector.rs
@@ -20,9 +20,9 @@ use std::{
str::FromStr,
};
+use dubbo_logger::tracing;
use http::Uri;
use hyper::client::connect::dns::Name;
-use logger::tracing;
use tokio::net::UnixStream;
use tower_service::Service;
diff --git a/dubbo/src/triple/transport/listener/mod.rs
b/dubbo/src/triple/transport/listener/mod.rs
index e3a70d7..2b20bab 100644
--- a/dubbo/src/triple/transport/listener/mod.rs
+++ b/dubbo/src/triple/transport/listener/mod.rs
@@ -22,7 +22,7 @@ pub mod unix_listener;
use std::net::SocketAddr;
use async_trait::async_trait;
-use logger::tracing;
+use dubbo_logger::tracing;
use tokio::io::{AsyncRead, AsyncWrite};
use super::io::BoxIO;
diff --git a/dubbo/src/triple/transport/listener/tcp_listener.rs
b/dubbo/src/triple/transport/listener/tcp_listener.rs
index 2ebbf4f..325c77f 100644
--- a/dubbo/src/triple/transport/listener/tcp_listener.rs
+++ b/dubbo/src/triple/transport/listener/tcp_listener.rs
@@ -19,9 +19,9 @@ use std::{net::SocketAddr, task};
use super::Listener;
use async_trait::async_trait;
+use dubbo_logger::tracing;
use futures_core::Stream;
use hyper::server::accept::Accept;
-use logger::tracing;
use tokio::net::{TcpListener as tokioTcpListener, TcpStream};
pub struct TcpListener {
diff --git a/dubbo/src/triple/transport/listener/unix_listener.rs
b/dubbo/src/triple/transport/listener/unix_listener.rs
index add071a..cd7dbe5 100644
--- a/dubbo/src/triple/transport/listener/unix_listener.rs
+++ b/dubbo/src/triple/transport/listener/unix_listener.rs
@@ -19,9 +19,9 @@ use std::{net::SocketAddr, task};
use super::Listener;
use async_trait::async_trait;
+use dubbo_logger::tracing;
use futures_core::Stream;
use hyper::server::accept::Accept;
-use logger::tracing;
use tokio::net::{UnixListener as tokioUnixListener, UnixStream};
pub struct UnixListener {
diff --git a/dubbo/src/triple/transport/service.rs
b/dubbo/src/triple/transport/service.rs
index b306085..8e86100 100644
--- a/dubbo/src/triple/transport/service.rs
+++ b/dubbo/src/triple/transport/service.rs
@@ -17,10 +17,10 @@
use std::net::SocketAddr;
+use dubbo_logger::tracing;
use futures_core::Future;
use http::{Request, Response};
use hyper::body::Body;
-use logger::tracing;
use tokio::time::Duration;
use tower_service::Service;
diff --git a/examples/echo/Cargo.toml b/examples/echo/Cargo.toml
index 53f8b9a..319c17b 100644
--- a/examples/echo/Cargo.toml
+++ b/examples/echo/Cargo.toml
@@ -28,7 +28,7 @@ prost-derive = {version = "0.10", optional = true}
prost = "0.10.4"
async-trait = "0.1.56"
tokio-stream = "0.1"
-logger.workspace=true
+dubbo-logger.workspace=true
hyper = { version = "0.14.19", features = ["full"]}
diff --git a/examples/echo/src/echo/client.rs b/examples/echo/src/echo/client.rs
index b107e30..db46958 100644
--- a/examples/echo/src/echo/client.rs
+++ b/examples/echo/src/echo/client.rs
@@ -30,7 +30,7 @@ impl Filter for FakeFilter {
#[tokio::main]
async fn main() {
- logger::init();
+ dubbo_logger::init();
// let builder = ClientBuilder::new()
// .with_connector("unix")
// .with_host("unix://127.0.0.1:8888");
diff --git a/examples/echo/src/echo/server.rs b/examples/echo/src/echo/server.rs
index 1e10a2e..90efc1a 100644
--- a/examples/echo/src/echo/server.rs
+++ b/examples/echo/src/echo/server.rs
@@ -46,7 +46,7 @@ impl Filter for FakeFilter {
#[tokio::main]
async fn main() {
- logger::init();
+ dubbo_logger::init();
register_server(EchoServerImpl {
name: "echo".to_string(),
});
diff --git a/examples/echo/src/generated/grpc.examples.echo.rs
b/examples/echo/src/generated/grpc.examples.echo.rs
index ccb385c..16fb163 100644
--- a/examples/echo/src/generated/grpc.examples.echo.rs
+++ b/examples/echo/src/generated/grpc.examples.echo.rs
@@ -1,12 +1,12 @@
+// @generated by apache/dubbo-rust.
+
/// EchoRequest is the request for echo.
-#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EchoRequest {
#[prost(string, tag = "1")]
pub message: ::prost::alloc::string::String,
}
/// EchoResponse is the response for echo.
-#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EchoResponse {
#[prost(string, tag = "1")]
diff --git a/examples/greeter/Cargo.toml b/examples/greeter/Cargo.toml
index a8c6cac..6ad3b1b 100644
--- a/examples/greeter/Cargo.toml
+++ b/examples/greeter/Cargo.toml
@@ -28,12 +28,12 @@ prost-derive = { version = "0.10", optional = true }
prost = "0.10.4"
async-trait = "0.1.56"
tokio-stream = "0.1"
-logger = { path = "../../common/logger" }
+dubbo-logger = { path = "../../common/logger" }
dubbo = { path = "../../dubbo", version = "0.3.0" }
dubbo-config = { path = "../../config", version = "0.3.0" }
registry-zookeeper.workspace = true
registry-nacos.workspace = true
-base.workspace = true
+dubbo-base.workspace = true
[build-dependencies]
dubbo-build = { path = "../../dubbo-build", version = "0.3.0" }
diff --git a/examples/greeter/src/greeter/client.rs
b/examples/greeter/src/greeter/client.rs
index 4591fd9..eed3e52 100644
--- a/examples/greeter/src/greeter/client.rs
+++ b/examples/greeter/src/greeter/client.rs
@@ -24,7 +24,7 @@ use std::env;
use dubbo::codegen::*;
-use base::Url;
+use dubbo_base::Url;
use futures_util::StreamExt;
use protos::{greeter_client::GreeterClient, GreeterRequest};
use registry_nacos::NacosRegistry;
@@ -32,7 +32,7 @@ use registry_zookeeper::ZookeeperRegistry;
#[tokio::main]
async fn main() {
- logger::init();
+ dubbo_logger::init();
let mut builder = ClientBuilder::new();
diff --git a/examples/greeter/src/greeter/server.rs
b/examples/greeter/src/greeter/server.rs
index 32931e5..94e4e53 100644
--- a/examples/greeter/src/greeter/server.rs
+++ b/examples/greeter/src/greeter/server.rs
@@ -24,7 +24,7 @@ use tokio_stream::wrappers::ReceiverStream;
use dubbo::{codegen::*, Dubbo};
use dubbo_config::RootConfig;
-use logger::{
+use dubbo_logger::{
tracing::{info, span},
Level,
};
@@ -44,7 +44,7 @@ type ResponseStream =
#[tokio::main]
async fn main() {
- logger::init();
+ dubbo_logger::init();
let span = span!(Level::DEBUG, "greeter.server");
let _enter = span.enter();
register_server(GreeterServerImpl {
diff --git a/metadata/Cargo.toml b/metadata/Cargo.toml
index 8e90a9c..967e072 100644
--- a/metadata/Cargo.toml
+++ b/metadata/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "metadata"
+name = "dubbo-metadata"
version = "0.3.0"
edition = "2021"
license = "Apache-2.0"
diff --git a/protocol/base/Cargo.toml b/protocol/base/Cargo.toml
index e3e8d86..34735be 100644
--- a/protocol/base/Cargo.toml
+++ b/protocol/base/Cargo.toml
@@ -7,5 +7,5 @@ edition = "2021"
[dependencies]
dashmap.workspace = true
-base.workspace = true
+dubbo-base.workspace = true
thiserror.workspace = true
\ No newline at end of file
diff --git a/protocol/base/src/invoker.rs b/protocol/base/src/invoker.rs
index 62bc8bf..14de6ce 100644
--- a/protocol/base/src/invoker.rs
+++ b/protocol/base/src/invoker.rs
@@ -18,7 +18,7 @@ use crate::{
invocation::BoxInvocation,
output::{BoxOutput, RPCOutput},
};
-use base::{Node, Url};
+use dubbo_base::{Node, Url};
use std::{
fmt::{Display, Formatter},
sync::{
diff --git a/protocol/triple/Cargo.toml b/protocol/triple/Cargo.toml
index 7b4dd9f..e14efd8 100644
--- a/protocol/triple/Cargo.toml
+++ b/protocol/triple/Cargo.toml
@@ -8,4 +8,4 @@ edition = "2021"
[dependencies]
remoting-net.workspace = true
protocol-base.workspace = true
-base.workspace = true
+dubbo-base.workspace = true
diff --git a/protocol/triple/src/triple_invoker.rs
b/protocol/triple/src/triple_invoker.rs
index 6756dce..2b77c9f 100644
--- a/protocol/triple/src/triple_invoker.rs
+++ b/protocol/triple/src/triple_invoker.rs
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-use base::{Node, Url};
+use dubbo_base::{Node, Url};
use protocol_base::{
invocation::BoxInvocation,
diff --git a/registry/nacos/Cargo.toml b/registry/nacos/Cargo.toml
index d30827b..2437bc0 100644
--- a/registry/nacos/Cargo.toml
+++ b/registry/nacos/Cargo.toml
@@ -14,8 +14,9 @@ dubbo.workspace = true
serde_json.workspace = true
serde = { workspace = true, features = ["derive"] }
anyhow.workspace = true
-logger.workspace = true
-base.workspace = true
+dubbo-logger.workspace = true
+dubbo-base.workspace = true
+
[dev-dependencies]
tracing-subscriber = "0.3.16"
tracing = "0.1"
diff --git a/registry/nacos/src/lib.rs b/registry/nacos/src/lib.rs
index cd6515b..bbbaaa2 100644
--- a/registry/nacos/src/lib.rs
+++ b/registry/nacos/src/lib.rs
@@ -16,7 +16,7 @@
*/
mod utils;
-use base::Url;
+use dubbo_base::Url;
use std::{
collections::{HashMap, HashSet},
sync::{Arc, Mutex},
@@ -24,7 +24,7 @@ use std::{
use anyhow::anyhow;
use dubbo::registry::{NotifyListener, Registry, RegistryNotifyListener,
ServiceEvent};
-use logger::tracing::{error, info, warn};
+use dubbo_logger::tracing::{error, info, warn};
use nacos_sdk::api::naming::{NamingService, NamingServiceBuilder,
ServiceInstance};
use crate::utils::{build_nacos_client_props, is_concrete_str, is_wildcard_str,
match_range};
diff --git a/registry/nacos/src/utils/mod.rs b/registry/nacos/src/utils/mod.rs
index f506732..b247f60 100644
--- a/registry/nacos/src/utils/mod.rs
+++ b/registry/nacos/src/utils/mod.rs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-use base::Url;
+use dubbo_base::Url;
use nacos_sdk::api::props::ClientProps;
const APP_NAME_KEY: &str = "AppName";
diff --git a/registry/zookeeper/Cargo.toml b/registry/zookeeper/Cargo.toml
index c7fb82e..2df5499 100644
--- a/registry/zookeeper/Cargo.toml
+++ b/registry/zookeeper/Cargo.toml
@@ -14,5 +14,5 @@ dubbo.workspace = true
serde_json.workspace = true
serde = { workspace = true, features = ["derive"] }
urlencoding.workspace = true
-logger.workspace = true
-base.workspace = true
+dubbo-logger.workspace = true
+dubbo-base.workspace = true
diff --git a/registry/zookeeper/src/lib.rs b/registry/zookeeper/src/lib.rs
index 4f11d3a..5debc0a 100644
--- a/registry/zookeeper/src/lib.rs
+++ b/registry/zookeeper/src/lib.rs
@@ -24,11 +24,11 @@ use std::{
time::Duration,
};
-use base::{
+use dubbo_base::{
constants::{DUBBO_KEY, LOCALHOST_IP, PROVIDERS_KEY},
Url,
};
-use logger::tracing::{debug, error, info};
+use dubbo_logger::tracing::{debug, error, info};
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use zookeeper::{Acl, CreateMode, WatchedEvent, WatchedEventType, Watcher,
ZooKeeper};
diff --git a/remoting/base/Cargo.toml b/remoting/base/Cargo.toml
index f5f2efc..ade97c1 100644
--- a/remoting/base/Cargo.toml
+++ b/remoting/base/Cargo.toml
@@ -7,7 +7,7 @@ edition = "2021"
[dependencies]
bytes.workspace = true
-base.workspace = true
+dubbo-base.workspace = true
thiserror.workspace = true
dashmap.workspace = true
protocol-base.workspace = true
diff --git a/remoting/base/src/exchange/client.rs
b/remoting/base/src/exchange/client.rs
index 4fceca7..edbb4a6 100644
--- a/remoting/base/src/exchange/client.rs
+++ b/remoting/base/src/exchange/client.rs
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-use base::Url;
+use dubbo_base::Url;
use std::{
sync::{
atomic::{AtomicBool, AtomicI32, Ordering},
diff --git a/remoting/base/src/exchange/server.rs
b/remoting/base/src/exchange/server.rs
index 26b1ecc..b2d1c66 100644
--- a/remoting/base/src/exchange/server.rs
+++ b/remoting/base/src/exchange/server.rs
@@ -16,7 +16,7 @@
*/
use anyhow::{Error, Result};
-use base::Url;
+use dubbo_base::Url;
use std::sync::Arc;
pub struct BoxedServer(Arc<dyn Server>);
diff --git a/remoting/net/Cargo.toml b/remoting/net/Cargo.toml
index 1e1682e..fc10a21 100644
--- a/remoting/net/Cargo.toml
+++ b/remoting/net/Cargo.toml
@@ -17,5 +17,5 @@ async-trait.workspace = true
dashmap.workspace = true
lazy_static.workspace = true
futures.workspace = true
-logger.workspace = true
+dubbo-logger.workspace = true
bb8.workspace = true
diff --git a/remoting/net/src/incoming.rs b/remoting/net/src/incoming.rs
index bca797e..63624f4 100644
--- a/remoting/net/src/incoming.rs
+++ b/remoting/net/src/incoming.rs
@@ -19,8 +19,8 @@ use std::{
task::{Context, Poll},
};
+use dubbo_logger::tracing;
use futures::Stream;
-use logger::tracing;
use pin_project::pin_project;
use tokio::net::TcpListener;
#[cfg(target_family = "unix")]
diff --git a/remoting/xds/Cargo.toml b/remoting/xds/Cargo.toml
index eb8c027..4786501 100644
--- a/remoting/xds/Cargo.toml
+++ b/remoting/xds/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "remoting-xds"
+name = "dubbo-remoting-xds"
version = "0.3.0"
edition = "2021"
license = "Apache-2.0"