6 #ifndef KAGOME_CORE_METRICS_EXPOSER_HPP 7 #define KAGOME_CORE_METRICS_EXPOSER_HPP 11 #include <boost/asio/io_context.hpp> 12 #include <boost/asio/ip/tcp.hpp> 23 using Acceptor = boost::asio::ip::tcp::acceptor;
24 using Endpoint = boost::asio::ip::tcp::endpoint;
36 void setHandler(
const std::shared_ptr<Handler> &handler) {
50 virtual bool start() = 0;
55 virtual void stop() = 0;
63 #endif // KAGOME_CORE_METRICS_EXPOSER_HPP void setHandler(const std::shared_ptr< Handler > &handler)
sets handler and takes ownership
virtual bool start()=0
start interface for AppStateManager
virtual ~Exposer()=default
boost::asio::io_context Context
boost::asio::ip::tcp::acceptor Acceptor
boost::asio::ip::tcp::endpoint Endpoint
std::shared_ptr< Handler > handler_
virtual bool prepare()=0
prepare interface for AppStateManager
an http server interface to expose metrics on request with custom request handler ...
virtual void stop()=0
stop interface for AppStateManager