pub struct Engine {
pub router: Arc<PartitionRouter>,
/* private fields */
}Expand description
The FlowFabric engine: partition routing + background scanners.
Fields§
§router: Arc<PartitionRouter>Implementations§
Source§impl Engine
impl Engine
Sourcepub fn start(config: EngineConfig, client: Client) -> Self
pub fn start(config: EngineConfig, client: Client) -> Self
Start the engine with the given config and Valkey client.
Spawns background scanner tasks. Returns immediately.
Sourcepub fn start_with_metrics(
config: EngineConfig,
client: Client,
metrics: Arc<Metrics>,
) -> Self
pub fn start_with_metrics( config: EngineConfig, client: Client, metrics: Arc<Metrics>, ) -> Self
PR-94: start the engine with a shared observability registry.
Used by ff-server so scanner cycle metrics funnel into the
same Prometheus registry exposed at /metrics. Under the
observability feature (flipped via the same feature on
ff-server / ff-engine), the handle records into an OTEL
MeterProvider; otherwise the shim no-ops.
Sourcepub fn start_with_completions(
config: EngineConfig,
client: Client,
metrics: Arc<Metrics>,
completions: CompletionStream,
) -> Self
pub fn start_with_completions( config: EngineConfig, client: Client, metrics: Arc<Metrics>, completions: CompletionStream, ) -> Self
Start the engine with a shared observability registry and a completion stream for push-based DAG promotion (issue #90).
The stream is typically produced by
ff_core::completion_backend::CompletionBackend::subscribe_completions.
The engine spawns a dispatch loop that drains the stream and
fires ff_resolve_dependency per completion, reducing DAG
latency from interval × levels to ~RTT × levels. The
dependency_reconciler scanner remains as a safety net for
completions missed during subscriber reconnect windows.
Auto Trait Implementations§
impl Freeze for Engine
impl RefUnwindSafe for Engine
impl Send for Engine
impl Sync for Engine
impl Unpin for Engine
impl UnsafeUnpin for Engine
impl UnwindSafe for Engine
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
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 more