1 #pragma once 2 3 #include "interfaces/json_storage.hpp" 4 #include "interfaces/report.hpp" 5 #include "interfaces/report_manager.hpp" 6 #include "types/report_action.hpp" 7 #include "types/report_types.hpp" 8 #include "types/report_updates.hpp" 9 #include "types/reporting_type.hpp" 10 11 #include <boost/asio/spawn.hpp> 12 13 #include <chrono> 14 #include <memory> 15 #include <optional> 16 17 namespace interfaces 18 { 19 20 class ReportFactory 21 { 22 public: 23 virtual ~ReportFactory() = default; 24 25 virtual std::vector<LabeledMetricParameters> 26 convertMetricParams(boost::asio::yield_context& yield, 27 const ReadingParameters& metricParams) const = 0; 28 29 virtual std::unique_ptr<interfaces::Report> 30 make(const std::string& name, const ReportingType reportingType, 31 const std::vector<ReportAction>& reportActions, 32 Milliseconds period, uint64_t appendLimit, 33 const ReportUpdates reportUpdates, ReportManager& reportManager, 34 JsonStorage& reportStorage, 35 std::vector<LabeledMetricParameters> labeledMetricParams, 36 bool enabled) const = 0; 37 }; 38 39 } // namespace interfaces 40