pub struct FlowEngine { /* private fields */ }Implementations§
Source§impl FlowEngine
impl FlowEngine
pub async fn new( packs: Vec<Arc<PackRuntime>>, config: Arc<HostConfig>, ) -> Result<FlowEngine, Error>
Sourcepub fn with_rollout_ids(self, rollout_ids: RolloutIds) -> FlowEngine
pub fn with_rollout_ids(self, rollout_ids: RolloutIds) -> FlowEngine
Bind the rollout identifiers of the revision-keyed runtime this engine serves, so every invocation’s telemetry carries deployment/bundle/ revision attribution (C5.4). Called by the Phase-D revision dispatcher when it constructs a revision runtime; tenant-only runtimes leave the default (empty) IDs.
Sourcepub fn rollout_ids(&self) -> &RolloutIds
pub fn rollout_ids(&self) -> &RolloutIds
The rollout identifiers bound to this engine (read counterpart to
with_rollout_ids). Empty by default for the
legacy tenant-only path.
Sourcepub fn set_cross_pack_resolver(&mut self, resolver: Arc<dyn CrossPackResolver>)
pub fn set_cross_pack_resolver(&mut self, resolver: Arc<dyn CrossPackResolver>)
Set an optional cross-pack resolver for provider.invoke nodes that
reference providers in other packs (resolved via capability registry).
Sourcepub fn set_remote_dispatch_handler(
&mut self,
handler: Arc<dyn RemoteDispatchHandler>,
)
pub fn set_remote_dispatch_handler( &mut self, handler: Arc<dyn RemoteDispatchHandler>, )
Set the handler that bridges sorla.call flow nodes into a separate
runtime over pub/sub. Constructed by the runner binary when a transport
(e.g. NATS) is configured.
pub async fn execute( &self, ctx: FlowContext<'_>, input: Value, ) -> Result<FlowExecution, Error>
pub async fn resume( &self, ctx: FlowContext<'_>, snapshot: FlowSnapshot, input: Value, ) -> Result<FlowExecution, Error>
pub fn flows(&self) -> &[FlowDescriptor]
pub fn flow_by_key( &self, pack_id: &str, flow_id: &str, ) -> Option<&FlowDescriptor>
pub fn flow_by_type(&self, flow_type: &str) -> Option<&FlowDescriptor>
Sourcepub fn entry_flow_by_type(&self, flow_type: &str) -> Option<&FlowDescriptor>
pub fn entry_flow_by_type(&self, flow_type: &str) -> Option<&FlowDescriptor>
Resolve a flow by type, considering only application entrypoint flows.
Used to disambiguate an inbound provider event (routed by flow type,
with no explicit pack_id/flow_id) when a pack registers one public
entrypoint plus internal helper flows of the same type — the common
“dispatcher + sub-flows” shape. Internal flows are only reachable via
flow.call, so they must never win a type-only route.
Flows owned by a messaging provider pack (its manifest declares a
messaging.* provider) are also excluded: a provider ships its own
ingress main/default flow that is plumbing for that provider, not
the application. In a multi-provider bundle that flow would otherwise
compete with the app’s real entrypoint and make the route ambiguous.
Returns None when zero or more than one application entry flow of the
type exists (genuinely ambiguous — the caller must then require a
pack_id).
pub fn flow_by_id(&self, flow_id: &str) -> Option<&FlowDescriptor>
Auto Trait Implementations§
impl !Freeze for FlowEngine
impl !RefUnwindSafe for FlowEngine
impl !UnwindSafe for FlowEngine
impl Send for FlowEngine
impl Sync for FlowEngine
impl Unpin for FlowEngine
impl UnsafeUnpin for FlowEngine
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> ⓘ
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> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request