mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 10:22:10 +00:00
414f470c79
* Refactoring: part 1 * Refactoring: part 2 * Handle request using ReadBuffer interface * Struggles with ReadBuffer's * Fix URI parsing * Implement parsing of multipart/form-data * Check HTTP_LENGTH_REQUIRED before eof() or will hang * Fix HTTPChunkedReadBuffer * Fix build and style * Fix test * Resist double-eof * Fix arcadian build
29 lines
568 B
C++
29 lines
568 B
C++
#pragma once
|
|
|
|
#include <Server/HTTP/HTTPRequestHandler.h>
|
|
|
|
#include "PrometheusMetricsWriter.h"
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class IServer;
|
|
|
|
class PrometheusRequestHandler : public HTTPRequestHandler
|
|
{
|
|
private:
|
|
IServer & server;
|
|
const PrometheusMetricsWriter & metrics_writer;
|
|
|
|
public:
|
|
explicit PrometheusRequestHandler(IServer & server_, const PrometheusMetricsWriter & metrics_writer_)
|
|
: server(server_)
|
|
, metrics_writer(metrics_writer_)
|
|
{
|
|
}
|
|
|
|
void handleRequest(HTTPServerRequest & request, HTTPServerResponse & response) override;
|
|
};
|
|
|
|
}
|