Archived
rename crates/ to engrams/, bindings/ to receptors/
- crates/ → engrams/ (Rust engrams live here) - bindings/ → receptors/ (cross-language access points into the graph) - Cargo.toml workspace paths updated
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/// Shared application state for all request handlers.
|
||||
use engram_core::EngramDb;
|
||||
use engram_projection::registry::ProjectionRegistry;
|
||||
use engram_sync::SyncEngine;
|
||||
use engram_tx::TransactionEngine;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
pub struct AppState {
|
||||
/// Local database — uses std::sync::Mutex (sync ops only, fast)
|
||||
pub db: Arc<Mutex<EngramDb>>,
|
||||
/// Sync engine — uses tokio::sync::Mutex so it can be held across .await
|
||||
pub sync_engine: Arc<tokio::sync::Mutex<SyncEngine>>,
|
||||
/// API key used to authenticate incoming sync requests
|
||||
pub api_key: String,
|
||||
/// Projection registry — named schema views over the activation surface
|
||||
pub projection_registry: Arc<Mutex<ProjectionRegistry>>,
|
||||
/// Transaction engine — append-only command log with rollback support
|
||||
pub tx_engine: Arc<Mutex<TransactionEngine>>,
|
||||
}
|
||||
Reference in New Issue
Block a user