Remove stub discover module.

This commit is contained in:
Henry de Valence 2019-10-22 12:49:31 -07:00
parent c3ec235a5b
commit 47ec2e2689
2 changed files with 0 additions and 36 deletions

View File

@ -33,7 +33,6 @@ use crate::{
};
mod candidate_set;
mod discover;
mod set;
mod unready_service;

View File

@ -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<Result<Change<Self::Key, Self::Service>, 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!();
}
}