mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-20 13:26:34 +00:00
Move protocols_handler to the root (#643)
This commit is contained in:
@ -209,6 +209,7 @@ mod tests;
|
||||
pub mod either;
|
||||
pub mod muxing;
|
||||
pub mod nodes;
|
||||
pub mod protocols_handler;
|
||||
pub mod topology;
|
||||
pub mod transport;
|
||||
pub mod upgrade;
|
||||
@ -216,6 +217,7 @@ pub mod upgrade;
|
||||
pub use self::multiaddr::Multiaddr;
|
||||
pub use self::muxing::StreamMuxer;
|
||||
pub use self::peer_id::PeerId;
|
||||
pub use self::protocols_handler::{ProtocolsHandler, ProtocolsHandlerEvent};
|
||||
pub use self::public_key::PublicKey;
|
||||
pub use self::transport::Transport;
|
||||
pub use self::upgrade::{InboundUpgrade, OutboundUpgrade, UpgradeInfo, UpgradeError};
|
||||
|
@ -23,12 +23,10 @@ pub mod handled_node;
|
||||
pub mod handled_node_tasks;
|
||||
pub mod listeners;
|
||||
pub mod node;
|
||||
pub mod protocols_handler;
|
||||
pub mod raw_swarm;
|
||||
pub mod swarm;
|
||||
|
||||
pub use self::node::Substream;
|
||||
pub use self::handled_node::{NodeHandlerEvent, NodeHandlerEndpoint};
|
||||
pub use self::protocols_handler::{ProtocolsHandler, ProtocolsHandlerEvent};
|
||||
pub use self::raw_swarm::{ConnectedPoint, Peer, RawSwarm, RawSwarmEvent};
|
||||
pub use self::swarm::{Swarm, NetworkBehavior, NetworkBehaviorAction};
|
||||
|
@ -24,9 +24,9 @@ use crate::{
|
||||
nodes::{
|
||||
handled_node::NodeHandler,
|
||||
node::Substream,
|
||||
protocols_handler::{NodeHandlerWrapper, ProtocolsHandler},
|
||||
raw_swarm::{RawSwarm, RawSwarmEvent, ConnectedPoint}
|
||||
},
|
||||
protocols_handler::{NodeHandlerWrapper, ProtocolsHandler},
|
||||
topology::Topology
|
||||
};
|
||||
use futures::prelude::*;
|
||||
|
@ -52,8 +52,8 @@ fn build_struct(ast: &DeriveInput, data_struct: &DataStruct) -> TokenStream {
|
||||
let trait_to_impl = quote!{::libp2p::core::nodes::swarm::NetworkBehavior};
|
||||
let either_ident = quote!{::libp2p::core::either::EitherOutput};
|
||||
let network_behaviour_action = quote!{::libp2p::core::nodes::swarm::NetworkBehaviorAction};
|
||||
let protocols_handler = quote!{::libp2p::core::nodes::protocols_handler::ProtocolsHandler};
|
||||
let proto_select_ident = quote!{::libp2p::core::nodes::protocols_handler::ProtocolsHandlerSelect};
|
||||
let protocols_handler = quote!{::libp2p::core::protocols_handler::ProtocolsHandler};
|
||||
let proto_select_ident = quote!{::libp2p::core::protocols_handler::ProtocolsHandlerSelect};
|
||||
let peer_id = quote!{::libp2p::core::PeerId};
|
||||
let connected_point = quote!{::libp2p::core::nodes::ConnectedPoint};
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
use crate::protocol::{FloodsubCodec, FloodsubConfig, FloodsubRpc};
|
||||
use futures::prelude::*;
|
||||
use libp2p_core::{
|
||||
nodes::{ProtocolsHandler, ProtocolsHandlerEvent},
|
||||
ProtocolsHandler, ProtocolsHandlerEvent,
|
||||
upgrade::{InboundUpgrade, OutboundUpgrade}
|
||||
};
|
||||
use smallvec::SmallVec;
|
||||
|
@ -22,7 +22,7 @@ use cuckoofilter::CuckooFilter;
|
||||
use futures::prelude::*;
|
||||
use handler::FloodsubHandler;
|
||||
use libp2p_core::nodes::{ConnectedPoint, NetworkBehavior, NetworkBehaviorAction};
|
||||
use libp2p_core::{nodes::protocols_handler::ProtocolsHandler, PeerId};
|
||||
use libp2p_core::{protocols_handler::ProtocolsHandler, PeerId};
|
||||
use protocol::{FloodsubMessage, FloodsubRpc, FloodsubSubscription, FloodsubSubscriptionAction};
|
||||
use rand;
|
||||
use smallvec::SmallVec;
|
||||
|
@ -21,7 +21,7 @@
|
||||
use crate::{IdentifySender, IdentifyProtocolConfig};
|
||||
use futures::prelude::*;
|
||||
use libp2p_core::{
|
||||
nodes::protocols_handler::{ProtocolsHandler, ProtocolsHandlerEvent},
|
||||
protocols_handler::{ProtocolsHandler, ProtocolsHandlerEvent},
|
||||
upgrade::{DeniedUpgrade, InboundUpgrade}
|
||||
};
|
||||
use smallvec::SmallVec;
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
use futures::prelude::*;
|
||||
use libp2p_core::nodes::{ConnectedPoint, NetworkBehavior, NetworkBehaviorAction};
|
||||
use libp2p_core::{nodes::protocols_handler::ProtocolsHandler, Multiaddr, PeerId};
|
||||
use libp2p_core::{protocols_handler::ProtocolsHandler, Multiaddr, PeerId};
|
||||
use smallvec::SmallVec;
|
||||
use std::{collections::HashMap, io, marker::PhantomData};
|
||||
use tokio_io::{AsyncRead, AsyncWrite};
|
||||
|
@ -21,7 +21,7 @@
|
||||
use crate::{RemoteInfo, IdentifyProtocolConfig};
|
||||
use futures::prelude::*;
|
||||
use libp2p_core::{
|
||||
nodes::protocols_handler::{ProtocolsHandler, ProtocolsHandlerEvent},
|
||||
protocols_handler::{ProtocolsHandler, ProtocolsHandlerEvent},
|
||||
upgrade::{self, DeniedUpgrade, OutboundUpgrade, Toggleable}
|
||||
};
|
||||
use std::{io, marker::PhantomData, time::{Duration, Instant}};
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
use futures::prelude::*;
|
||||
use libp2p_core::nodes::{ConnectedPoint, NetworkBehavior, NetworkBehaviorAction};
|
||||
use libp2p_core::{nodes::protocols_handler::ProtocolsHandler, Multiaddr, PeerId};
|
||||
use libp2p_core::{protocols_handler::ProtocolsHandler, Multiaddr, PeerId};
|
||||
use std::{collections::VecDeque, marker::PhantomData};
|
||||
use tokio_io::{AsyncRead, AsyncWrite};
|
||||
use {IdentifyInfo, PeriodicIdentification, PeriodicIdentificationEvent};
|
||||
|
@ -21,7 +21,8 @@
|
||||
use futures::prelude::*;
|
||||
use libp2p_core::{
|
||||
OutboundUpgrade,
|
||||
nodes::{ProtocolsHandler, ProtocolsHandlerEvent},
|
||||
ProtocolsHandler,
|
||||
ProtocolsHandlerEvent,
|
||||
upgrade::{self, DeniedUpgrade}
|
||||
};
|
||||
use log::warn;
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
use futures::prelude::*;
|
||||
use libp2p_core::nodes::{ConnectedPoint, NetworkBehavior, NetworkBehaviorAction};
|
||||
use libp2p_core::{nodes::protocols_handler::ProtocolsHandler, PeerId};
|
||||
use libp2p_core::{protocols_handler::ProtocolsHandler, PeerId};
|
||||
use std::marker::PhantomData;
|
||||
use tokio_io::{AsyncRead, AsyncWrite};
|
||||
use void::Void;
|
||||
|
@ -22,7 +22,8 @@ use arrayvec::ArrayVec;
|
||||
use futures::prelude::*;
|
||||
use libp2p_core::{
|
||||
InboundUpgrade,
|
||||
nodes::{ProtocolsHandler, ProtocolsHandlerEvent},
|
||||
ProtocolsHandler,
|
||||
ProtocolsHandlerEvent,
|
||||
upgrade::DeniedUpgrade
|
||||
};
|
||||
use log::warn;
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
use futures::prelude::*;
|
||||
use libp2p_core::nodes::{ConnectedPoint, NetworkBehavior, NetworkBehaviorAction};
|
||||
use libp2p_core::{nodes::protocols_handler::ProtocolsHandler, PeerId};
|
||||
use libp2p_core::{protocols_handler::ProtocolsHandler, PeerId};
|
||||
use std::marker::PhantomData;
|
||||
use tokio_io::{AsyncRead, AsyncWrite};
|
||||
use void::Void;
|
||||
|
Reference in New Issue
Block a user