ClickHouse/dbms/src/Server/InterserverIOHTTPHandler.h

35 lines
714 B
C++
Raw Normal View History

2014-03-21 13:42:14 +00:00
#pragma once
#include "Server.h"
#include <DB/Common/CurrentMetrics.h>
2014-03-21 13:42:14 +00:00
namespace CurrentMetrics
{
extern const Metric InterserverConnection;
}
2014-03-21 13:42:14 +00:00
namespace DB
{
class InterserverIOHTTPHandler : public Poco::Net::HTTPRequestHandler
{
public:
InterserverIOHTTPHandler(Server & server_)
: server(server_)
, log(&Logger::get("InterserverIOHTTPHandler"))
2014-03-21 13:42:14 +00:00
{
}
void handleRequest(Poco::Net::HTTPServerRequest & request, Poco::Net::HTTPServerResponse & response) override;
2014-03-21 13:42:14 +00:00
private:
Server & server;
CurrentMetrics::Increment metric_increment{CurrentMetrics::InterserverConnection};
2014-03-21 13:42:14 +00:00
Logger * log;
void processQuery(Poco::Net::HTTPServerRequest & request, Poco::Net::HTTPServerResponse & response);
};
}