2018-08-19 17:09:54 +00:00
|
|
|
#pragma once
|
2021-02-19 12:51:26 +00:00
|
|
|
|
|
|
|
#include <Server/HTTP/HTTPRequestHandler.h>
|
2018-08-19 17:09:54 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
2021-02-19 12:51:26 +00:00
|
|
|
|
|
|
|
/// Simple ping handler, answers "Ok." to GET request
|
|
|
|
class PingHandler : public HTTPRequestHandler
|
2018-08-19 17:09:54 +00:00
|
|
|
{
|
|
|
|
public:
|
2021-02-19 12:51:26 +00:00
|
|
|
explicit PingHandler(size_t keep_alive_timeout_) : keep_alive_timeout(keep_alive_timeout_) {}
|
2024-01-03 16:47:15 +00:00
|
|
|
void handleRequest(HTTPServerRequest & request, HTTPServerResponse & response, const ProfileEvents::Event & write_event) override;
|
2018-08-19 17:09:54 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
size_t keep_alive_timeout;
|
|
|
|
};
|
2021-02-19 12:51:26 +00:00
|
|
|
|
2018-08-19 17:09:54 +00:00
|
|
|
}
|