Split src/engine/mod.rs into handle/message/snapshot submodules
Pure code-motion refactor, no logic changes. Follows the repo convention of one struct/enum + its impl per module file: - engine/handle.rs: the left-right write/read plumbing (EngineOp, IndexWriter, IndexReadHandle, IndexReader, EngineHandle) and the actor loop (spawn/run) that owns EngineSnapshot. - engine/message.rs: EngineQuery/EngineMessage/EngineResponse. - engine/snapshot/: EngineSnapshot itself, split by concern into params.rs (declaration + auto-detect), metrics.rs (declare/apply/ backfill), filter.rs (search-bar filter compilation/eval), sort.rs (sort-helper indexes), and query.rs (handle_query_inner + PromQL evaluation), with mod.rs holding the struct and the accessors shared across all of them. - engine/tests.rs: the inline test module, kept as one file (per the task's own escape hatch) since most tests exercise ingest -> declare -> query across several of the new submodules at once rather than one in isolation. Visibility was narrowed per call site: pub(super) where only sibling snapshot submodules need an item, pub(crate) where engine::handle or engine::tests (outside the snapshot subtree) also need it. cargo build --all-targets and cargo test are green (291 passed, 1 ignored, same as before the split). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1ZJ3SrayzLzVndhVq9BmS
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
3b3ace146a
commit
f19fa50a25
+14
-4383
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user