2016-01-17 13:34:36 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Poco/Net/HTTPRequestHandler.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class Context;
|
|
|
|
|
2017-03-09 00:56:38 +00:00
|
|
|
/// Replies "Ok.\n" if all replicas on this server don't lag too much. Otherwise output lag information.
|
2016-01-17 13:34:36 +00:00
|
|
|
class ReplicasStatusHandler : public Poco::Net::HTTPRequestHandler
|
|
|
|
{
|
|
|
|
private:
|
2017-04-01 07:20:54 +00:00
|
|
|
Context & context;
|
2016-01-17 13:34:36 +00:00
|
|
|
|
|
|
|
public:
|
2017-09-07 21:04:48 +00:00
|
|
|
explicit ReplicasStatusHandler(Context & context_);
|
2016-01-17 13:34:36 +00:00
|
|
|
|
2017-04-01 07:20:54 +00:00
|
|
|
void handleRequest(Poco::Net::HTTPServerRequest & request, Poco::Net::HTTPServerResponse & response) override;
|
2016-01-17 13:34:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|