Skip to content

Commit

Permalink
Remove the config module, the types belong in magicsock
Browse files Browse the repository at this point in the history
This changes the public api because for some reason config was public.
  • Loading branch information
flub committed Jun 17, 2024
1 parent 1390884 commit 23bc378
Show file tree
Hide file tree
Showing 5 changed files with 146 additions and 191 deletions.
6 changes: 3 additions & 3 deletions iroh-gossip/src/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type ProtoMessage = proto::Message<PublicKey>;
#[derive(Debug, Clone)]
pub struct Gossip {
to_actor_tx: mpsc::Sender<ToActor>,
on_endpoints_tx: mpsc::Sender<Vec<iroh_net::config::DirectAddress>>,
on_endpoints_tx: mpsc::Sender<Vec<iroh_net::endpoint::DirectAddress>>,
_actor_handle: Arc<JoinHandle<anyhow::Result<()>>>,
max_message_size: usize,
}
Expand Down Expand Up @@ -249,7 +249,7 @@ impl Gossip {
/// This is only best effort, and will drop new events if backed up.
pub fn update_endpoints(
&self,
endpoints: &[iroh_net::config::DirectAddress],
endpoints: &[iroh_net::endpoint::DirectAddress],
) -> anyhow::Result<()> {
let endpoints = endpoints.to_vec();
self.on_endpoints_tx
Expand Down Expand Up @@ -345,7 +345,7 @@ struct Actor {
/// Input events to the state (emitted from the connection loops)
in_event_rx: mpsc::Receiver<InEvent>,
/// Updates of discovered endpoint addresses
on_endpoints_rx: mpsc::Receiver<Vec<iroh_net::config::DirectAddress>>,
on_endpoints_rx: mpsc::Receiver<Vec<iroh_net::endpoint::DirectAddress>>,
/// Queued timers
timers: Timers<Timer>,
/// Currently opened quinn connections to peers
Expand Down
143 changes: 0 additions & 143 deletions iroh-net/src/config.rs

This file was deleted.

2 changes: 1 addition & 1 deletion iroh-net/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub use quinn::{

pub use super::magicsock::{
ConnectionInfo, ConnectionType, ConnectionTypeStream, ControlMsg, DirectAddrInfo,
DirectAdressesStream,
DirectAddress, DirectAddressType, DirectAdressesStream,
};

pub use iroh_base::node_addr::{AddrInfo, NodeAddr};
Expand Down
1 change: 0 additions & 1 deletion iroh-net/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
#![recursion_limit = "256"]
#![deny(missing_docs, rustdoc::broken_intra_doc_links)]

pub mod config;
pub mod defaults;
pub mod dialer;
mod disco;
Expand Down
Loading

0 comments on commit 23bc378

Please sign in to comment.