ClickHouse/programs/server/PingRequestHandler.h

28 lines
478 B
C++
Raw Normal View History

2017-08-09 14:33:07 +00:00
#pragma once
#include "IServer.h"
2017-08-09 14:33:07 +00:00
#include <Poco/Net/HTTPRequestHandler.h>
namespace DB
{
/// Response with "Ok.\n". Used for availability checks.
class PingRequestHandler : public Poco::Net::HTTPRequestHandler
{
private:
IServer & server;
2017-08-09 14:33:07 +00:00
public:
explicit PingRequestHandler(IServer & server_) : server(server_)
{
}
2017-08-09 14:33:07 +00:00
void handleRequest(
Poco::Net::HTTPServerRequest & request,
Poco::Net::HTTPServerResponse & response) override;
};
}