pub struct StreamManager { /* private fields */ }Expand description
Manager for multiple replication streams (consumer groups)
Implementations§
Source§impl StreamManager
impl StreamManager
Sourcepub fn new(log: Arc<ReplicationLog>) -> Self
pub fn new(log: Arc<ReplicationLog>) -> Self
Create a new stream manager
Sourcepub fn create_stream(
&self,
consumer_id: impl Into<String>,
) -> Arc<ReplicationStream>
pub fn create_stream( &self, consumer_id: impl Into<String>, ) -> Arc<ReplicationStream>
Create a new stream for a consumer
Sourcepub fn create_stream_with_config(
&self,
consumer_id: impl Into<String>,
config: StreamConfig,
) -> Arc<ReplicationStream>
pub fn create_stream_with_config( &self, consumer_id: impl Into<String>, config: StreamConfig, ) -> Arc<ReplicationStream>
Create a stream with custom configuration
Sourcepub fn active_streams(&self) -> Vec<Arc<ReplicationStream>>
pub fn active_streams(&self) -> Vec<Arc<ReplicationStream>>
Get all active streams
Sourcepub fn stream_count(&self) -> usize
pub fn stream_count(&self) -> usize
Get the number of active streams
Auto Trait Implementations§
impl Freeze for StreamManager
impl !RefUnwindSafe for StreamManager
impl Send for StreamManager
impl Sync for StreamManager
impl Unpin for StreamManager
impl !UnwindSafe for StreamManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more