http_private: move all code in workers::common to common

This commit is contained in:
Joakim Frostegård 2022-04-03 00:51:07 +02:00
parent 8478a2b052
commit c424ffb077
4 changed files with 9 additions and 19 deletions

View file

@ -3,10 +3,14 @@ use tokio::sync::{mpsc, oneshot};
use aquatic_common::CanonicalSocketAddr;
use aquatic_http_protocol::{common::InfoHash, response::Response};
use crate::{
config::Config,
workers::{common::ChannelAnnounceRequest, socket::db::ValidatedAnnounceRequest},
};
use crate::{config::Config, workers::socket::db::ValidatedAnnounceRequest};
#[derive(Debug)]
pub struct ChannelAnnounceRequest {
pub request: ValidatedAnnounceRequest,
pub source_addr: CanonicalSocketAddr,
pub response_sender: oneshot::Sender<Response>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub struct RequestWorkerIndex(pub usize);