pub struct MemoryEventBus { /* private fields */ }Expand description
In-memory event bus using tokio broadcast channels.
Events are only broadcast within a single process. If you have multiple server replicas, they will NOT receive each other’s events.
Implementations§
Trait Implementations§
Source§impl Default for MemoryEventBus
impl Default for MemoryEventBus
Source§impl EventBus for MemoryEventBus
impl EventBus for MemoryEventBus
Source§fn publish<'life0, 'life1, 'async_trait>(
&'life0 self,
env_id: &'life1 EnvironmentId,
event: SecretChangeEvent,
) -> Pin<Box<dyn Future<Output = Result<(), EventBusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn publish<'life0, 'life1, 'async_trait>(
&'life0 self,
env_id: &'life1 EnvironmentId,
event: SecretChangeEvent,
) -> Pin<Box<dyn Future<Output = Result<(), EventBusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Publish a secret change event to all watchers of this environment. Read more
Source§fn subscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
env_id: &'life1 EnvironmentId,
) -> Pin<Box<dyn Future<Output = Result<EventStream, EventBusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn subscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
env_id: &'life1 EnvironmentId,
) -> Pin<Box<dyn Future<Output = Result<EventStream, EventBusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Subscribe to secret change events for an environment. Read more
Auto Trait Implementations§
impl Freeze for MemoryEventBus
impl !RefUnwindSafe for MemoryEventBus
impl Send for MemoryEventBus
impl Sync for MemoryEventBus
impl Unpin for MemoryEventBus
impl !UnwindSafe for MemoryEventBus
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