Skip to main content

journal_engine/
lib.rs

1//! Journal processing engine
2//!
3//! This crate provides the core engine for processing systemd journal files, including
4//! indexing, caching, querying, and histogram computation. It's designed to be independent
5//! of specific metrics implementations or UI frameworks.
6//!
7//! # Key Components
8//!
9//! - **IndexingEngine**: Background file indexing with worker pool and cache management
10//! - **HistogramEngine**: Time-series histogram computation over journal entries
11//! - **Log Queries**: Flexible log entry retrieval with filtering
12//! - **Facets**: Field selection configuration for indexing
13//!
14//! # Architecture
15//!
16//! The engine layer provides the foundational infrastructure that higher-level crates
17//! (like `journal-sql` and `journal-function`) build upon. It handles all the complexity
18//! of file indexing, caching strategies, and query execution.
19
20// Public modules
21pub mod cache;
22pub mod error;
23pub mod facets;
24pub mod histogram;
25pub mod indexing;
26pub mod logs;
27pub mod query_time_range;
28
29// Re-export key types for convenience
30pub use cache::{FileIndexCache, FileIndexKey};
31pub use error::{EngineError, Result};
32pub use facets::Facets;
33pub use histogram::{
34    BucketRequest, BucketResponse, Histogram, HistogramEngine, calculate_bucket_duration,
35};
36pub use indexing::{FileIndexCacheBuilder, batch_compute_file_indexes};
37pub use journal_index::IndexingLimits;
38pub use logs::{CellValue, ColumnInfo, LogEntryData, LogQuery, Table, entry_data_to_table};
39pub use query_time_range::QueryTimeRange;