pub struct EventReactor<'a, T, E, G>{ /* private fields */ }
Expand description
Redis event stream reactor
Implementations§
Source§impl<'a, T, E, G> EventReactor<'a, T, E, G>
impl<'a, T, E, G> EventReactor<'a, T, E, G>
pub fn new(data: T::Data, stream_key: Cow<'a, str>) -> Self
Sourcepub async fn initialize_consumer_group(
&mut self,
) -> Result<ConsumerGroupState, RedisError>
pub async fn initialize_consumer_group( &mut self, ) -> Result<ConsumerGroupState, RedisError>
Manually initialize Redis consumer group; this will otherwise initialize automatically as needed and is useful for knowing if a consumer group was previously created
Sourcepub async fn clear_idle_backlog(
&mut self,
min_idle: &Duration,
max_idle: &Option<Duration>,
) -> Result<(), RedisError>
pub async fn clear_idle_backlog( &mut self, min_idle: &Duration, max_idle: &Option<Duration>, ) -> Result<(), RedisError>
Process idle-pending backlog without claiming new entries until none remain and max_idle has elapsed (relative to start_time)
Sourcepub async fn start_reactor(
&mut self,
claim_mode: ClaimMode,
) -> Result<(), RedisError>
pub async fn start_reactor( &mut self, claim_mode: ClaimMode, ) -> Result<(), RedisError>
Process redis stream entries until shutdown signal received
pub fn shutdown_token(&self) -> Arc<CancellationToken>
Auto Trait Implementations§
impl<'a, T, E, G> Freeze for EventReactor<'a, T, E, G>
impl<'a, T, E, G> RefUnwindSafe for EventReactor<'a, T, E, G>
impl<'a, T, E, G> Send for EventReactor<'a, T, E, G>
impl<'a, T, E, G> Sync for EventReactor<'a, T, E, G>
impl<'a, T, E, G> Unpin for EventReactor<'a, T, E, G>
impl<'a, T, E, G> UnwindSafe for EventReactor<'a, T, E, G>
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