Kagome
Polkadot Runtime Engine in C++17
handler.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CORE_METRICS_HANDLER_HPP
7 #define KAGOME_CORE_METRICS_HANDLER_HPP
8 
9 #include <memory>
10 
11 #include "metrics/session.hpp"
12 
13 namespace kagome::metrics {
14 
15  class Registry;
16  class Session;
17 
22  class Handler {
23  public:
24  virtual ~Handler() = default;
28  virtual void registerCollectable(Registry &registry) = 0;
29 
33  virtual void onSessionRequest(Session::Request request,
34  std::shared_ptr<Session> session) = 0;
35  };
36 
37 } // namespace kagome::metrics
38 
39 #endif // KAGOME_CORE_METRICS_HANDLER_HPP
an interface to add request handler for metrics::Exposer implementation generally will contain metric...
Definition: handler.hpp:22
boost::beast::http::request< Body > Request
Definition: session.hpp:22
virtual void registerCollectable(Registry &registry)=0
registers general type metrics registry for metrics collection
virtual void onSessionRequest(Session::Request request, std::shared_ptr< Session > session)=0
main interface for session request handling
virtual ~Handler()=default
the class stores metrics, provides interface to create metrics and families of metrics TODO(sanblch) ...
Definition: registry.hpp:30