blob: f5a1c5b97bb72d9924812413cf795743b340dc3a [file] [log] [blame]
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +02001#pragma once
2
Wludzik, Jozefe2362792020-10-27 17:23:55 +01003#include "interfaces/json_storage.hpp"
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +02004#include "interfaces/report.hpp"
5#include "interfaces/report_manager.hpp"
Krzysztof Grobelny51497a02021-11-09 14:56:22 +01006#include "types/report_action.hpp"
Krzysztof Grobelnydcc4e192021-03-08 09:09:34 +00007#include "types/report_types.hpp"
Krzysztof Grobelny51497a02021-11-09 14:56:22 +01008#include "types/report_updates.hpp"
9#include "types/reporting_type.hpp"
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020010
Wludzik, Jozefe2362792020-10-27 17:23:55 +010011#include <boost/asio/spawn.hpp>
12
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020013#include <chrono>
14#include <memory>
Wludzik, Jozefe2362792020-10-27 17:23:55 +010015#include <optional>
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020016
17namespace interfaces
18{
19
20class ReportFactory
21{
22 public:
23 virtual ~ReportFactory() = default;
24
Krzysztof Grobelnydcc4e192021-03-08 09:09:34 +000025 virtual std::vector<LabeledMetricParameters>
26 convertMetricParams(boost::asio::yield_context& yield,
27 const ReadingParameters& metricParams) const = 0;
28
Szymon Dompkeb4ef22e2022-02-07 15:15:12 +010029 virtual std::unique_ptr<interfaces::Report> make(
30 const std::string& id, const std::string& name,
31 const ReportingType reportingType,
32 const std::vector<ReportAction>& reportActions, Milliseconds period,
33 uint64_t appendLimit, const ReportUpdates reportUpdates,
34 ReportManager& reportManager, JsonStorage& reportStorage,
35 std::vector<LabeledMetricParameters> labeledMetricParams, bool enabled,
36 const std::vector<std::string>& triggerIds) const = 0;
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020037};
38
39} // namespace interfaces