mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
29 lines
602 B
C++
29 lines
602 B
C++
#pragma once
|
|
|
|
#include <Server/HTTP/HTTPRequestHandler.h>
|
|
|
|
#include "PrometheusMetricsWriter.h"
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class IServer;
|
|
|
|
class PrometheusRequestHandler : public HTTPRequestHandler
|
|
{
|
|
private:
|
|
IServer & server;
|
|
PrometheusMetricsWriterPtr metrics_writer;
|
|
|
|
public:
|
|
PrometheusRequestHandler(IServer & server_, PrometheusMetricsWriterPtr metrics_writer_)
|
|
: server(server_)
|
|
, metrics_writer(std::move(metrics_writer_))
|
|
{
|
|
}
|
|
|
|
void handleRequest(HTTPServerRequest & request, HTTPServerResponse & response, const ProfileEvents::Event & write_event) override;
|
|
};
|
|
|
|
}
|