Add helper classes for log reading
The goal is to inject span reader factory deep into the log reading
and sorting. LogFilesContainer encapsulates log files and provides
a couple of useful validations and abstractions to simplify log sorting.
It is the first part of change. Follow one will push SelectedLogParts
even deeper into the log reader.
Change-Id: Ic5253bd2b7c87fbbf55ad8d39a480af2871ddb71
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/events/logging/logfile_utils.h b/aos/events/logging/logfile_utils.h
index 67b6b84..3281bc8 100644
--- a/aos/events/logging/logfile_utils.h
+++ b/aos/events/logging/logfile_utils.h
@@ -592,7 +592,8 @@
// boot.
class PartsMerger {
public:
- PartsMerger(std::vector<LogParts> parts);
+ PartsMerger(std::string_view node_name, size_t boot_count,
+ const LogFilesContainer &log_files);
// Copying and moving will mess up the internal raw pointers. Just don't do
// it.
@@ -657,7 +658,7 @@
// stream.
class BootMerger {
public:
- BootMerger(std::vector<LogParts> file);
+ BootMerger(std::string_view node_name, const LogFilesContainer &log_files);
// Copying and moving will mess up the internal raw pointers. Just don't do
// it.
@@ -716,7 +717,8 @@
// notifying when new data is queued as well as queueing until a point in time.
class TimestampMapper {
public:
- TimestampMapper(std::vector<LogParts> file);
+ TimestampMapper(std::string_view node_name,
+ const LogFilesContainer &log_files);
// Copying and moving will mess up the internal raw pointers. Just don't do
// it.