- src/api/: HTTP router + DTOs + the MCP server (the HTTP/MCP-facing surface): mod.rs (formerly api.rs), dto.rs, mcp_server.rs. - src/cli/: argument parsing and process entry (formerly inline in main.rs) plus session registry: mod.rs, sessions.rs. main.rs is now a thin entry point that just declares modules and calls cli::run(). - src/engine/: the actor + everything it depends on to parse/index/ query log lines: mod.rs (formerly engine.rs), alerts.rs, promql.rs, rate.rs, ingest.rs, logfmt.rs, filter_parser.rs/.pest, filter_datetime.rs, index_key.rs, data_value.rs, metric_primitive.rs, timestamp.rs. - src/config/: persisted configuration: mod.rs (formerly settings.rs), profile.rs. - src/consts.rs stays at the crate root, used from every module above. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1ZJ3SrayzLzVndhVq9BmS
33 lines
735 B
Rust
33 lines
735 B
Rust
use crate::engine::metric_primitive::MetricPrimitive;
|
|
use crate::engine::timestamp::Timestamp;
|
|
use serde::Serialize;
|
|
use std::collections::BTreeMap;
|
|
|
|
#[allow(dead_code)]
|
|
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize)]
|
|
pub enum IndexKey {
|
|
Start,
|
|
IngestedLog {
|
|
sequence: u64,
|
|
timestamp: Timestamp,
|
|
},
|
|
LogParamSplit,
|
|
ParamDeclaration {
|
|
name: String,
|
|
},
|
|
ParamMetricSplit,
|
|
MetricDeclaration {
|
|
name: String,
|
|
},
|
|
MetricBucketSplit,
|
|
Bucket {
|
|
metric_name: String,
|
|
labels: BTreeMap<String, MetricPrimitive>,
|
|
},
|
|
LastMetricEvent {
|
|
metric_name: String,
|
|
labels: BTreeMap<String, MetricPrimitive>,
|
|
},
|
|
End,
|
|
}
|