use alloc::vec::Vec;
use core::time::Duration;
use crate::topic::Topic;
use subduction_core::peer::id::PeerId;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct EphemeralEvent {
pub id: Topic,
pub sender: PeerId,
pub nonce: u64,
pub payload: Vec<u8>,
}
#[derive(Debug, Clone, Copy)]
pub struct EphemeralConfig {
pub max_payload_size: usize,
pub channel_capacity: usize,
pub nonce_window_duration: Duration,
pub max_message_age: Duration,
}
impl Default for EphemeralConfig {
fn default() -> Self {
Self {
max_payload_size: 65_536,
channel_capacity: 1024,
nonce_window_duration: Duration::from_secs(30),
max_message_age: Duration::from_secs(30),
}
}
}