Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 3 | #include "interfaces/json_storage.hpp" |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 4 | #include "interfaces/report.hpp" |
| 5 | #include "interfaces/report_manager.hpp" |
Krzysztof Grobelny | 51497a0 | 2021-11-09 14:56:22 +0100 | [diff] [blame] | 6 | #include "types/report_action.hpp" |
Krzysztof Grobelny | dcc4e19 | 2021-03-08 09:09:34 +0000 | [diff] [blame] | 7 | #include "types/report_types.hpp" |
Krzysztof Grobelny | 51497a0 | 2021-11-09 14:56:22 +0100 | [diff] [blame] | 8 | #include "types/report_updates.hpp" |
| 9 | #include "types/reporting_type.hpp" |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 10 | |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 11 | #include <boost/asio/spawn.hpp> |
| 12 | |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 13 | #include <chrono> |
| 14 | #include <memory> |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 15 | #include <optional> |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 16 | |
| 17 | namespace interfaces |
| 18 | { |
| 19 | |
| 20 | class ReportFactory |
| 21 | { |
| 22 | public: |
| 23 | virtual ~ReportFactory() = default; |
| 24 | |
Krzysztof Grobelny | dcc4e19 | 2021-03-08 09:09:34 +0000 | [diff] [blame] | 25 | virtual std::vector<LabeledMetricParameters> |
| 26 | convertMetricParams(boost::asio::yield_context& yield, |
| 27 | const ReadingParameters& metricParams) const = 0; |
| 28 | |
Szymon Dompke | b4ef22e | 2022-02-07 15:15:12 +0100 | [diff] [blame] | 29 | 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, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 37 | }; |
| 38 | |
| 39 | } // namespace interfaces |