From 47ec2e2689c1d95ffd4b1c3e66907a2f2b6f24ef Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Tue, 22 Oct 2019 12:49:31 -0700 Subject: [PATCH] Remove stub discover module. --- zebra-network/src/peer_set.rs | 1 - zebra-network/src/peer_set/discover.rs | 35 -------------------------- 2 files changed, 36 deletions(-) delete mode 100644 zebra-network/src/peer_set/discover.rs diff --git a/zebra-network/src/peer_set.rs b/zebra-network/src/peer_set.rs index 229e98bd..2d5b70e6 100644 --- a/zebra-network/src/peer_set.rs +++ b/zebra-network/src/peer_set.rs @@ -33,7 +33,6 @@ use crate::{ }; mod candidate_set; -mod discover; mod set; mod unready_service; diff --git a/zebra-network/src/peer_set/discover.rs b/zebra-network/src/peer_set/discover.rs deleted file mode 100644 index a803c315..00000000 --- a/zebra-network/src/peer_set/discover.rs +++ /dev/null @@ -1,35 +0,0 @@ -use std::{ - net::SocketAddr, - pin::Pin, - task::{Context, Poll}, -}; - -use tokio::prelude::*; -use tower::discover::{Change, Discover}; - -use crate::peer::{PeerClient, PeerError}; - -/// A [`tower::discover::Discover`] implementation to report new `PeerClient`s. -/// -/// Because the `PeerClient` and `PeerServer` are always created together, either -/// by a `PeerConnector` or a `PeerListener`, and the `PeerServer` spawns a task -/// owned by Tokio, we only need to manage the `PeerClient` handles. -pub struct PeerDiscover { - // add fields; -} - -impl Discover for PeerDiscover { - type Key = SocketAddr; - type Service = PeerClient; - type Error = PeerError; - - fn poll_discover( - self: Pin<&mut Self>, - cx: &mut Context<'_>, - ) -> Poll, Self::Error>> { - // Do stuff and possibly produce new peers?? - - // Change enum has insert and delete variants, but we only need to consider inserts here.. - unimplemented!(); - } -}