summaryrefslogtreecommitdiff
path: root/src/ingestor.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ingestor.hpp')
-rw-r--r--src/ingestor.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ingestor.hpp b/src/ingestor.hpp
index 7141515..040331f 100644
--- a/src/ingestor.hpp
+++ b/src/ingestor.hpp
@@ -6,6 +6,7 @@
#include <cstdio>
#include <flat_set>
#include <scn/scan.h>
+#include <span>
namespace WebStat {
class Ingestor {
@@ -33,7 +34,10 @@ namespace WebStat {
size_t linesDiscarded = 0;
private:
- template<typename... T> size_t storeEntities(const std::tuple<T...> &) const;
+ static constexpr size_t MAX_NEW_ENTITIES = 6;
+ void storeEntities(std::span<const std::optional<Entity>>) const;
+ using NewEntities = std::array<std::optional<Entity>, MAX_NEW_ENTITIES>;
+ template<typename... T> NewEntities newEntities(const std::tuple<T...> &) const;
mutable std::flat_set<Crc32Value> existingEntities;
uint32_t hostnameId;