Skip to main content

rns_net/
event.rs

1//! Event types for the driver loop — concrete sync instantiation.
2
3pub use crate::common::event::{
4    BlackholeInfo, HolePunchPolicy, HookInfo, InterfaceStatsResponse, LinkInfoEntry,
5    LocalDestinationEntry, NextHopResponse, PathTableEntry, QueryRequest, QueryResponse,
6    RateTableEntry, ResourceInfoEntry, SingleInterfaceStat,
7};
8
9/// Concrete Event type using boxed sync Writer.
10pub type Event = crate::common::event::Event<Box<dyn crate::interface::Writer>>;
11
12pub type EventSender = std::sync::mpsc::Sender<Event>;
13pub type EventReceiver = std::sync::mpsc::Receiver<Event>;
14
15pub fn channel() -> (EventSender, EventReceiver) {
16    std::sync::mpsc::channel()
17}