ClickHouse/src/Server/PostgreSQLHandlerFactory.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
760 B
C++
Raw Normal View History

2020-05-30 17:04:02 +00:00
#pragma once
2020-05-30 20:02:11 +00:00
#include <atomic>
#include <memory>
#include <Server/IServer.h>
#include <Server/TCPServerConnectionFactory.h>
2020-05-30 17:04:02 +00:00
#include <Core/PostgreSQLProtocol.h>
#include "config.h"
2020-05-30 17:04:02 +00:00
namespace DB
{
class PostgreSQLHandlerFactory : public TCPServerConnectionFactory
2020-05-30 17:04:02 +00:00
{
private:
IServer & server;
Poco::Logger * log;
2020-06-08 12:05:49 +00:00
#if USE_SSL
2020-05-30 17:04:02 +00:00
bool ssl_enabled = true;
#else
bool ssl_enabled = false;
#endif
std::atomic<Int32> last_connection_id = 0;
std::vector<std::shared_ptr<PostgreSQLProtocol::PGAuthentication::AuthenticationMethod>> auth_methods;
public:
explicit PostgreSQLHandlerFactory(IServer & server_);
2020-05-30 17:04:02 +00:00
Poco::Net::TCPServerConnection * createConnection(const Poco::Net::StreamSocket & socket, TCPServer & server) override;
2020-05-30 17:04:02 +00:00
};
}