pub struct EventStore { /* private fields */ }Expand description
High-performance event store with columnar storage
Implementations§
Source§impl EventStore
impl EventStore
Sourcepub fn with_config(config: EventStoreConfig) -> Self
pub fn with_config(config: EventStoreConfig) -> Self
Create event store with custom configuration
Sourcepub fn websocket_manager(&self) -> Arc<WebSocketManager>
pub fn websocket_manager(&self) -> Arc<WebSocketManager>
Get the WebSocket manager for this store
Sourcepub fn snapshot_manager(&self) -> Arc<SnapshotManager>
pub fn snapshot_manager(&self) -> Arc<SnapshotManager>
Get the snapshot manager for this store
Sourcepub fn compaction_manager(&self) -> Option<Arc<CompactionManager>>
pub fn compaction_manager(&self) -> Option<Arc<CompactionManager>>
Get the compaction manager for this store
Sourcepub fn schema_registry(&self) -> Arc<SchemaRegistry>
pub fn schema_registry(&self) -> Arc<SchemaRegistry>
Get the schema registry for this store (v0.5 feature)
Sourcepub fn replay_manager(&self) -> Arc<ReplayManager>
pub fn replay_manager(&self) -> Arc<ReplayManager>
Get the replay manager for this store (v0.5 feature)
Sourcepub fn pipeline_manager(&self) -> Arc<PipelineManager>
pub fn pipeline_manager(&self) -> Arc<PipelineManager>
Get the pipeline manager for this store (v0.5 feature)
Sourcepub fn metrics(&self) -> Arc<MetricsRegistry>
pub fn metrics(&self) -> Arc<MetricsRegistry>
Get the metrics registry for this store (v0.6 feature)
Sourcepub fn flush_storage(&self) -> Result<()>
pub fn flush_storage(&self) -> Result<()>
Manually flush any pending events to persistent storage
Sourcepub fn create_snapshot(&self, entity_id: &str) -> Result<()>
pub fn create_snapshot(&self, entity_id: &str) -> Result<()>
Manually create a snapshot for an entity
Sourcepub fn query(&self, request: QueryEventsRequest) -> Result<Vec<Event>>
pub fn query(&self, request: QueryEventsRequest) -> Result<Vec<Event>>
Query events based on filters (optimized with indices)
Sourcepub fn reconstruct_state(
&self,
entity_id: &str,
as_of: Option<DateTime<Utc>>,
) -> Result<Value>
pub fn reconstruct_state( &self, entity_id: &str, as_of: Option<DateTime<Utc>>, ) -> Result<Value>
Reconstruct entity state as of a specific timestamp v0.2: Now uses snapshots for fast reconstruction
Sourcepub fn get_snapshot(&self, entity_id: &str) -> Result<Value>
pub fn get_snapshot(&self, entity_id: &str) -> Result<Value>
Get snapshot from projection (faster than reconstructing)
Sourcepub fn stats(&self) -> StoreStats
pub fn stats(&self) -> StoreStats
Get statistics about the event store
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EventStore
impl !RefUnwindSafe for EventStore
impl Send for EventStore
impl Sync for EventStore
impl Unpin for EventStore
impl !UnwindSafe for EventStore
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