Browse Source

Move pub/sub to it's own module

master
Alex Mikhalev 4 years ago
parent
commit
ec49c28425
  1. 6
      src/lib.rs
  2. 5
      src/pub_sub/mod.rs
  3. 0
      src/pub_sub/publication.rs
  4. 0
      src/pub_sub/subscription.rs

6
src/lib.rs

@ -1,14 +1,12 @@
mod broker_task; mod broker_task;
mod message; mod message;
mod publication; mod pub_sub;
mod subscription;
use broker_task::{ use broker_task::{
AdvertiseRequest, BrokerError, BrokerRequestSender, BrokerResult, BrokerTask, SubscribeRequest, AdvertiseRequest, BrokerError, BrokerRequestSender, BrokerResult, BrokerTask, SubscribeRequest,
}; };
pub use message::Message; pub use message::Message;
pub use publication::{Publication, PublishError}; pub use pub_sub::*;
pub use subscription::{Subscription, SubscriptionError};
use futures::executor::block_on; use futures::executor::block_on;
use tokio::sync::oneshot; use tokio::sync::oneshot;

5
src/pub_sub/mod.rs

@ -0,0 +1,5 @@
mod publication;
mod subscription;
pub use publication::{Publication, PublishError};
pub use subscription::{Subscription, SubscriptionError};

0
src/publication.rs → src/pub_sub/publication.rs

0
src/subscription.rs → src/pub_sub/subscription.rs

Loading…
Cancel
Save