Line data Source code
1 : #ifndef KAFKAOPMON_PLUGIN_STREAMOPMONFACILITY_HPP_
2 : #define KAFKAOPMON_PLUGIN_STREAMOPMONFACILITY_HPP_
3 :
4 : #include "opmonlib/OpMonFacility.hpp"
5 : #include "kafkaopmon/OpMonPublisher.hpp"
6 :
7 : #include <memory>
8 : #include <nlohmann/json.hpp>
9 : #include <regex>
10 : #include <string>
11 :
12 : using json = nlohmann::json;
13 :
14 : namespace dunedaq { // namespace dunedaq
15 :
16 3 : ERS_DECLARE_ISSUE(kafkaopmon, WrongURI, "Incorrect URI: " << uri, ((std::string)uri))
17 :
18 : } // namespace dunedaq
19 :
20 : namespace dunedaq::kafkaopmon { // namespace dunedaq
21 :
22 : class streamOpMonFacility : public dunedaq::opmonlib::OpMonFacility
23 : {
24 : std::unique_ptr<OpMonPublisher> m_publisher;
25 :
26 : public:
27 : explicit streamOpMonFacility(std::string uri, dunedaq::opmonlib::OptionalOrigin );
28 0 : void publish( opmon::OpMonEntry && e ) const override {
29 0 : m_publisher -> publish(std::move(e));
30 0 : }
31 :
32 : };
33 :
34 : } // namespace dunedaq::kafkaopmon
35 :
36 : #endif // KAFKAOPMON_PLUGIN_STREAMOPMONFACILITY_HPP_
37 :
|