1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright Nicholas Harring. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify it under
// the terms of the Server Side Public License, version 1, as published by MongoDB, Inc.
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the Server Side Public License for more details. You should have received a copy of the
// Server Side Public License along with this program.
// If not, see <http://www.mongodb.com/licensing/server-side-public-license>.
use crateLogGroup;
use Error;
/// Defines the core interface for log processing drains.
///
/// The `Drain` trait abstracts the mechanism by which log lines are processed,
/// clustered into `LogGroup`s, and subsequently retrieved. Implementations of
/// this trait can offer various strategies for log analysis, such as simple
/// in-memory storage or more complex, multi-stage processing pipelines.
///
/// This abstraction allows other parts of the system, like the `LogStore`,
/// to operate on log data generically, without being coupled to a specific
/// drain implementation.