Skip to main content

drain_flow/
lib.rs

1// Copyright Nicholas Harring. All rights reserved.
2//
3// This program is free software: you can redistribute it and/or modify it under
4// the terms of the Server Side Public License, version 1, as published by MongoDB, Inc.
5// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
6// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7// See the Server Side Public License for more details. You should have received a copy of the
8// Server Side Public License along with this program.
9// If not, see <http://www.mongodb.com/licensing/server-side-public-license>.
10
11#[macro_use]
12extern crate custom_derive;
13#[macro_use]
14extern crate enum_derive;
15
16pub mod drains;
17pub mod intern_benchmark_harness;
18pub mod log_group;
19pub mod record;
20
21/// # Log Querying
22///
23/// This module provides structures and functions for querying processed log data.
24/// Log data is structured into `LogGroup`s, which are collections of similar log records.
25/// The primary structure for querying this data is the [`query::LogStore`].
26///
27/// The `LogStore` is generic and operates on data provided by a [`drains::api::Drain`]
28/// implementation. This means it doesn't own the log data directly but rather queries
29/// it from the underlying drain.
30///
31/// Key functionalities include:
32/// - Retrieving `LogGroup`s by their unique ID via the `LogStore`.
33/// - Filtering `LogGroup`s based on a specific time range using the `LogStore`.
34/// - Executing LogQL queries against the `LogStore` using [`query::execute_logql_query`].
35/// - Performing range-based aggregation on records (from specific log groups or LogQL queries)
36///   within a given time window, facilitated by [`query::query_log_range_aggregation`].
37pub mod query;