pub struct FlowRuntime { /* private fields */ }Expand description
The main flow execution runtime
Implementations§
Source§impl FlowRuntime
impl FlowRuntime
Sourcepub fn new(
flows: Vec<CompiledFlow>,
event_log: Arc<dyn EventLog>,
link_service: Arc<dyn LinkService>,
entity_fetchers: HashMap<String, Arc<dyn EntityFetcher>>,
) -> Self
pub fn new( flows: Vec<CompiledFlow>, event_log: Arc<dyn EventLog>, link_service: Arc<dyn LinkService>, entity_fetchers: HashMap<String, Arc<dyn EntityFetcher>>, ) -> Self
Create a new FlowRuntime
Sourcepub fn with_consumer_name(self, name: impl Into<String>) -> Self
pub fn with_consumer_name(self, name: impl Into<String>) -> Self
Set a custom consumer name (for multi-consumer setups)
Sourcepub fn with_sink_registry(self, registry: Arc<SinkRegistry>) -> Self
pub fn with_sink_registry(self, registry: Arc<SinkRegistry>) -> Self
Set the sink registry for deliver operators
Without a sink registry, the deliver operator will log but not
actually dispatch to any sink.
Sourcepub fn run(self, position: SeekPosition) -> JoinHandle<()>
pub fn run(self, position: SeekPosition) -> JoinHandle<()>
Start the runtime as a background task
Returns a JoinHandle that resolves when the runtime stops. The runtime runs indefinitely, processing events as they arrive.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FlowRuntime
impl !RefUnwindSafe for FlowRuntime
impl Send for FlowRuntime
impl Sync for FlowRuntime
impl Unpin for FlowRuntime
impl UnsafeUnpin for FlowRuntime
impl !UnwindSafe for FlowRuntime
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