pub struct WorkflowEventBus { /* private fields */ }Expand description
Typed wrapper around an EngineEventBus. Per-subsystem wrappers
(workflow, auth, secrets) share the underlying bus instance at the
engine level but produce/consume their own typed events.
Implementations§
Source§impl WorkflowEventBus
impl WorkflowEventBus
pub fn new(inner: Arc<dyn EngineEventBus>) -> Self
Sourcepub async fn publish(
&self,
namespace: &str,
ev: WorkflowBusEvent,
) -> Result<i64>
pub async fn publish( &self, namespace: &str, ev: WorkflowBusEvent, ) -> Result<i64>
Publish a typed workflow event. namespace is the owning
workflow’s namespace.
Sourcepub async fn read_since(
&self,
namespace: &str,
after: Option<i64>,
filter: &EventFilter,
limit: u32,
) -> Result<Vec<Event>, CursorGoneError>
pub async fn read_since( &self, namespace: &str, after: Option<i64>, filter: &EventFilter, limit: u32, ) -> Result<Vec<Event>, CursorGoneError>
Read a cursor’s worth of events for this namespace (any subsystem — SSE uses this for the replay phase).
Sourcepub fn inner(&self) -> Arc<dyn EngineEventBus>
pub fn inner(&self) -> Arc<dyn EngineEventBus>
Expose the underlying bus so the scheduler + SSE can subscribe at the generic level and filter for any subsystem.
Trait Implementations§
Source§impl Clone for WorkflowEventBus
impl Clone for WorkflowEventBus
Source§fn clone(&self) -> WorkflowEventBus
fn clone(&self) -> WorkflowEventBus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WorkflowEventBus
impl !RefUnwindSafe for WorkflowEventBus
impl Send for WorkflowEventBus
impl Sync for WorkflowEventBus
impl Unpin for WorkflowEventBus
impl UnsafeUnpin for WorkflowEventBus
impl !UnwindSafe for WorkflowEventBus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more