pub struct EmbeddedKernel { /* private fields */ }Expand description
One opened embedded kernel: the composed service plus the store handle for operational tooling (replay, stats, compaction).
Implementations§
Source§impl EmbeddedKernel
impl EmbeddedKernel
Sourcepub fn open(data_dir: &Path) -> Result<Self, PortError>
pub fn open(data_dir: &Path) -> Result<Self, PortError>
Opens the store at data_dir (fail-fast per ADR-012) and composes the
kernel. An existing directory opens with the engine it was created
with; a fresh one gets the caller’s resolved default. SQLite permits
several sessions to share the same data directory.
Sourcepub fn open_with_engine(
data_dir: &Path,
engine: Option<StorageEngine>,
) -> Result<Self, PortError>
pub fn open_with_engine( data_dir: &Path, engine: Option<StorageEngine>, ) -> Result<Self, PortError>
open with a say in the engine (ADR-018): a fresh
directory is created for engine; an existing one must already be
engine, and the mismatch is refused by name rather than quietly
opened as whatever it is — that is how a user ends up on the wrong
engine without knowing. None means no preference.
Sourcepub fn engine(&self) -> StorageEngine
pub fn engine(&self) -> StorageEngine
The engine behind this kernel’s store, as its data directory records it. Surfaced at startup and by the doctor so a user can see which one they are on.
pub fn data_dir(&self) -> &Path
pub fn store(&self) -> &EmbeddedKernelStore
pub fn service(&self) -> Arc<EmbeddedMemoryService> ⓘ
pub fn quality_observer(&self) -> Arc<dyn QualityMetricsObserver> ⓘ
pub fn quality_telemetry_dropped_observations(&self) -> u64
pub fn quality_telemetry_write_failures(&self) -> u64
pub fn quality_telemetry_error(&self) -> Option<&str>
pub fn quality_telemetry_active(&self) -> bool
Sourcepub fn quality_telemetry_reader(&self) -> Option<SqliteQualityTelemetryReader>
pub fn quality_telemetry_reader(&self) -> Option<SqliteQualityTelemetryReader>
Live query side for the same shareable SQLite journal used by the quality observer.