Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename creates with dubbo prefix #131

Merged
merged 2 commits into from
Mar 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
4 changes: 2 additions & 2 deletions common/base/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "base"
name = "dubbo-base"
version = "0.1.0"
edition = "2021"

Expand All @@ -8,4 +8,4 @@ edition = "2021"
[dependencies]
urlencoding.workspace = true
http = "0.2"
logger.workspace = true
dubbo-logger.workspace = true
2 changes: 1 addition & 1 deletion common/base/src/url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion common/extention/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "extention"
name = "dubbo-extention"
version = "0.1.0"
edition = "2021"

Expand Down
4 changes: 2 additions & 2 deletions common/logger/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "logger"
name = "dubbo-logger"
version = "0.3.0"
edition = "2021"

Expand All @@ -9,4 +9,4 @@ edition = "2021"
tracing = "0.1"
tracing-subscriber = "0.3"
once_cell.workspace = true
utils.workspace = true
dubbo-utils.workspace = true
2 changes: 1 addition & 1 deletion common/logger/src/tracing_configurer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion common/utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "utils"
name = "dubbo-utils"
version = "0.1.0"
edition = "2021"

Expand Down
4 changes: 2 additions & 2 deletions config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
dubbo-utils.workspace = true
dubbo-logger.workspace=true
6 changes: 3 additions & 3 deletions config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions dubbo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }

Expand Down
1 change: 1 addition & 0 deletions dubbo/README.md
1 change: 1 addition & 0 deletions dubbo/README_CN.md
23 changes: 0 additions & 23 deletions dubbo/readme.md

This file was deleted.

4 changes: 2 additions & 2 deletions dubbo/src/cluster/directory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down
2 changes: 1 addition & 1 deletion dubbo/src/cluster/loadbalance/impls/random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion dubbo/src/cluster/loadbalance/impls/roundrobin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
2 changes: 1 addition & 1 deletion dubbo/src/cluster/loadbalance/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion dubbo/src/cluster/support/cluster_invoker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
2 changes: 1 addition & 1 deletion dubbo/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use std::{
thread,
};

use logger::tracing;
use dubbo_logger::tracing;
use serde_json::Value;
use state::Container;

Expand Down
2 changes: 1 addition & 1 deletion dubbo/src/filter/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

use std::time::{SystemTime, UNIX_EPOCH};

use logger::tracing;
use dubbo_logger::tracing;
use serde_json::Value;

use crate::{
Expand Down
2 changes: 1 addition & 1 deletion dubbo/src/filter/timeout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
4 changes: 2 additions & 2 deletions dubbo/src/framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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写一个通用的

Expand Down
2 changes: 1 addition & 1 deletion dubbo/src/protocol/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion dubbo/src/protocol/triple/triple_invoker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion dubbo/src/protocol/triple/triple_protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion dubbo/src/protocol/triple/triple_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

use crate::triple::server::builder::ServerBuilder;
use base::Url;
use dubbo_base::Url;

#[derive(Default, Clone)]
pub struct TripleServer {
Expand Down
10 changes: 5 additions & 5 deletions dubbo/src/registry/memory_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -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(),
Expand All @@ -88,15 +88,15 @@ impl Registry for MemoryRegistry {

fn subscribe(
&self,
url: base::Url,
url: dubbo_base::Url,
listener: RegistryNotifyListener,
) -> Result<(), crate::StdError> {
todo!()
}

fn unsubscribe(
&self,
url: base::Url,
url: dubbo_base::Url,
listener: RegistryNotifyListener,
) -> Result<(), crate::StdError> {
todo!()
Expand Down
2 changes: 1 addition & 1 deletion dubbo/src/registry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions dubbo/src/registry/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
4 changes: 2 additions & 2 deletions dubbo/src/registry/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
2 changes: 1 addition & 1 deletion dubbo/src/triple/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
4 changes: 2 additions & 2 deletions dubbo/src/triple/server/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion dubbo/src/triple/transport/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion dubbo/src/triple/transport/connector/http_connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Loading