From 14bac9fb06ec9c3ee822da2215a525839aaad454 Mon Sep 17 00:00:00 2001 From: luyanbo Date: Thu, 30 Mar 2023 20:08:20 +0800 Subject: [PATCH] rename with dubbo prefix --- 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/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 +- dubbo/src/triple/transport/connector/http_connector.rs | 2 +- dubbo/src/triple/transport/connector/unix_connector.rs | 2 +- dubbo/src/triple/transport/listener/mod.rs | 2 +- dubbo/src/triple/transport/listener/tcp_listener.rs | 2 +- dubbo/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 +- 59 files changed, 85 insertions(+), 84 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 735eda40..5270ba42 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 7397c195..40579e0d 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 48fbc1eb..b5801bbd 100644 --- a/common/base/src/url.rs +++ b/common/base/src/url.rs @@ -48,7 +48,7 @@ impl Url { let uri = url .parse::() .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 9b1450c1..f7c688ca 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 e965706e..b2708287 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 1e2081f8..1d546c8c 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 0b8c84f1..2732b30f 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 b4e19d47..628aae81 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 f63b490c..ba0a0898 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 a814bd0d..5f79fe8d 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/src/cluster/directory.rs b/dubbo/src/cluster/directory.rs index 8c2536c0..e74fc6d4 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 ddfcd396..3e1cf651 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 0c59ed4e..5fd0ed49 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 fd48ed96..9273d07e 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 67c98397..0ccca488 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 e94eb26a..268dee09 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 b17168bf..8551fe7d 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 ea14183f..f0076659 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 f91ee434..d595f38a 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 886308de..58dca5fd 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 d7d54ee1..6139cc91 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 fd1d3691..71f6edc4 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 1db27fa0..89f959ca 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 38d08e26..db878d6f 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 c5e26743..31106f0f 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; pub trait Registry { diff --git a/dubbo/src/registry/protocol.rs b/dubbo/src/registry/protocol.rs index 4f86fd35..12509503 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 16b9063d..ae7c7ca0 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 efdbee6b..07c1160b 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 1623540a..15a7e935 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 2188f2bd..1b978750 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 255d64e0..99c1a845 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 70ceda99..1448fb92 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 e3a70d76..2b20babf 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 2ebbf4f3..325c77f6 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 add071a8..cd7dbe57 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 b306085d..8e861006 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 53f8b9a3..319c17b3 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 b107e305..db46958c 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 1e10a2e8..90efc1a6 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 ccb385cd..16fb1638 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 a8c6cacf..6ad3b1b5 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 4591fd9c..eed3e522 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 32931e5f..94e4e53b 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 8e90a9c8..967e072b 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 e3e8d86c..34735be1 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 62bc8bf7..14de6ce8 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 7b4dd9f9..e14efd82 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 6756dce4..2b77c9f2 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 d30827b6..2437bc0b 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 cd6515be..bbbaaa2f 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 f5067323..b247f60d 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 c7fb82e9..2df54995 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 4f11d3ae..5debc0ab 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 f5f2efcd..ade97c1a 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 4fceca7d..edbb4a63 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 26b1ecc5..b2d1c66a 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); diff --git a/remoting/net/Cargo.toml b/remoting/net/Cargo.toml index 1e1682ef..fc10a21f 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 bca797e9..63624f4c 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 eb8c027e..47865015 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"