Skip to content

Commit

Permalink
Fix: cargo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
onewe committed Mar 10, 2024
1 parent c4d3144 commit ca82644
Show file tree
Hide file tree
Showing 9 changed files with 124 additions and 84 deletions.
1 change: 0 additions & 1 deletion dubbo/src/directory/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ use crate::{
};
use dubbo_base::Url;
use dubbo_logger::tracing::{debug, error};
use futures_core::ready;
use futures_util::future;
use tokio::sync::mpsc::channel;
use tokio_stream::wrappers::ReceiverStream;
Expand Down
2 changes: 1 addition & 1 deletion dubbo/src/extension/registry_extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ pub mod proxy {
use thiserror::Error;
use tokio::sync::oneshot;

use crate::extension::Extension;

use dubbo_base::Url;
use dubbo_logger::tracing::error;

Expand Down
3 changes: 1 addition & 2 deletions dubbo/src/framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ use std::{
collections::HashMap,
error::Error,
pin::Pin,
sync::{Arc, Mutex},
};

use crate::{
extension,
extension::registry_extension::{proxy::RegistryProxy, Registry},
extension::registry_extension::{Registry},
protocol::{BoxExporter, Protocol},
registry::protocol::RegistryProtocol,
};
Expand Down
1 change: 0 additions & 1 deletion dubbo/src/invoker/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use dubbo_base::Url;

use crate::{codegen::TripleInvoker, invoker::clone_invoker::CloneInvoker, svc::NewService};

Expand Down
1 change: 0 additions & 1 deletion dubbo/src/registry/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ use std::{
sync::{Arc, RwLock},
};

use super::n_registry::StaticRegistry;
use crate::{
extension::registry_extension::{proxy::RegistryProxy, InterfaceName, Registry},
protocol::{
Expand Down
5 changes: 0 additions & 5 deletions dubbo/src/registry/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@
* limitations under the License.
*/

use std::{
collections::HashMap,
sync::{Arc, Mutex},
};

use itertools::Itertools;

//
// pub type Registries = Arc<Mutex<HashMap<String, ArcRegistry>>>;
Expand Down
179 changes: 117 additions & 62 deletions examples/echo/src/generated/grpc.examples.echo.rs

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions examples/greeter/src/greeter/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
use std::{io::ErrorKind, pin::Pin};

use async_trait::async_trait;
use dubbo_base::Url;
use futures_util::{Stream, StreamExt};
use registry_nacos::{NacosRegistry, NacosRegistryExtensionLoader};
use registry_nacos::NacosRegistry;
use tokio::sync::mpsc;
use tokio_stream::wrappers::ReceiverStream;

Expand All @@ -34,8 +33,6 @@ use protos::{
greeter_server::{register_server, Greeter},
GreeterReply, GreeterRequest,
};
use registry_zookeeper::ZookeeperRegistry;

pub mod protos {
#![allow(non_camel_case_types)]
include!(concat!(env!("OUT_DIR"), "/org.apache.dubbo.sample.tri.rs"));
Expand Down
11 changes: 4 additions & 7 deletions registry/nacos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,26 @@ mod utils;
use async_trait::async_trait;
use dubbo_base::Url;
use std::{collections::HashMap, sync::Arc};
use tokio::{select, sync::mpsc};
use tokio::{sync::mpsc};

use anyhow::anyhow;
use dubbo::{
extension::{
registry_extension::{
proxy::RegistryProxy, AppName, Category, DiscoverStream, Group, InterfaceName,
AppName, Category, DiscoverStream, Group, InterfaceName,
Registry, RegistryUrl, ServiceChange, ServiceNamespace, Version,
},
Extension,
},
StdError,
};
use dubbo_base::url::UrlParam;
use dubbo_logger::tracing::{debug, error, info};
use dubbo_logger::tracing::info;
use nacos_sdk::api::{
naming::{NamingEventListener, NamingService, NamingServiceBuilder, ServiceInstance},
props::ClientProps,
};
use tokio::sync::{watch, Notify};

use crate::utils::{build_nacos_client_props, is_concrete_str, is_wildcard_str, match_range};

pub struct NacosRegistryExtensionLoader;

pub struct NacosRegistry {
url: Url,
Expand Down Expand Up @@ -418,6 +414,7 @@ pub mod tests {

use core::time;
use std::thread;
use tracing::error;

use dubbo::extension::{registry_extension::Side, ExtensionName};
use tracing::metadata::LevelFilter;
Expand Down

0 comments on commit ca82644

Please sign in to comment.