Skip to main content

lago_api/
state.rs

1use std::path::PathBuf;
2use std::sync::Arc;
3
4use lago_core::Journal;
5use lago_store::BlobStore;
6
7/// Shared application state threaded through all axum handlers.
8///
9/// Wrapped in `Arc` so it can be cheaply cloned into every request.
10pub struct AppState {
11    /// Event journal (session + event persistence).
12    pub journal: Arc<dyn Journal>,
13    /// Content-addressed blob store.
14    pub blob_store: Arc<BlobStore>,
15    /// Root path for filesystem data.
16    pub data_dir: PathBuf,
17}