#[derive(Debug, Clone)]
pub struct LaserstreamConfig {
pub api_key: String,
pub endpoint: String,
pub max_reconnect_attempts: Option<u32>,
}
impl Default for LaserstreamConfig {
fn default() -> Self {
Self {
api_key: String::new(),
endpoint: String::new(),
max_reconnect_attempts: None, }
}
}
impl LaserstreamConfig {
pub fn new(endpoint: String, api_key: String) -> Self {
Self {
endpoint,
api_key,
max_reconnect_attempts: None, }
}
pub fn with_max_reconnect_attempts(mut self, attempts: u32) -> Self {
self.max_reconnect_attempts = Some(attempts);
self
}
}