mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 21:42:39 +00:00
20 lines
465 B
C++
20 lines
465 B
C++
#pragma once
|
|
|
|
#include <Server/HTTP/HTTPRequestHandler.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/// Simple ping handler, answers "Ok." to GET request
|
|
class PingHandler : public HTTPRequestHandler
|
|
{
|
|
public:
|
|
explicit PingHandler(size_t keep_alive_timeout_) : keep_alive_timeout(keep_alive_timeout_) {}
|
|
void handleRequest(HTTPServerRequest & request, HTTPServerResponse & response, const ProfileEvents::Event & write_event) override;
|
|
|
|
private:
|
|
size_t keep_alive_timeout;
|
|
};
|
|
|
|
}
|