pub struct EngineRuntime { /* private fields */ }Expand description
Core engine runtime.
§Drop order invariant
Fields are ordered so that coordinator (reader connections) drops before
writer (writer thread + connection). This ensures the writer’s
sqlite3_close() is the last connection to the database, which triggers
SQLite’s automatic passive WAL checkpoint and WAL/shm file cleanup.
_lock drops last so the exclusive file lock is released only after all
connections are closed. Do not reorder these fields.
telemetry holds shared counters and has no drop-order concern (atomics).
Implementations§
Source§impl EngineRuntime
impl EngineRuntime
Sourcepub fn open(
path: impl AsRef<Path>,
provenance_mode: ProvenanceMode,
vector_dimension: Option<usize>,
read_pool_size: usize,
telemetry_level: TelemetryLevel,
query_embedder: Option<Arc<dyn QueryEmbedder>>,
) -> Result<Self, EngineError>
pub fn open( path: impl AsRef<Path>, provenance_mode: ProvenanceMode, vector_dimension: Option<usize>, read_pool_size: usize, telemetry_level: TelemetryLevel, query_embedder: Option<Arc<dyn QueryEmbedder>>, ) -> Result<Self, EngineError>
§Errors
Returns EngineError if the database connection cannot be opened, schema bootstrap fails,
or the writer actor cannot be started.
pub fn coordinator(&self) -> &ExecutionCoordinator
pub fn writer(&self) -> &WriterActor
pub fn admin(&self) -> &AdminHandle
Sourcepub fn telemetry(&self) -> &Arc<TelemetryCounters>
pub fn telemetry(&self) -> &Arc<TelemetryCounters>
Shared telemetry counters for incrementing from the public API layer.
Sourcepub fn telemetry_snapshot(&self) -> TelemetrySnapshot
pub fn telemetry_snapshot(&self) -> TelemetrySnapshot
Read all telemetry counters and aggregate SQLite cache status across
the reader pool.