#[derive(Clone, Debug)]
pub struct PublisherConfig {
pub(in super::super) group_name: Option<String>,
pub(in super::super) stream_length: usize,
}
const MAX_STREAM_LENGTH_DEFAULT: usize = 500_000;
impl PublisherConfig {
pub fn new() -> Self {
Self {
group_name: None,
stream_length: MAX_STREAM_LENGTH_DEFAULT,
}
}
pub fn group_name(mut self, group_name: impl Into<String>) -> Self {
self.group_name = Some(group_name.into());
self
}
pub fn stream_length(mut self, length: usize) -> Self {
self.stream_length = length;
self
}
}