mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 10:52:30 +00:00
37 lines
645 B
C++
37 lines
645 B
C++
#pragma once
|
|
#include <common/types.h>
|
|
#include <IO/ReadBuffer.h>
|
|
#include <IO/WriteBuffer.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/// Lets you know where to send requests to get to the replica.
|
|
|
|
struct ReplicatedMergeTreeAddress
|
|
{
|
|
String host;
|
|
UInt16 replication_port;
|
|
UInt16 queries_port;
|
|
String database;
|
|
String table;
|
|
String scheme;
|
|
|
|
ReplicatedMergeTreeAddress() = default;
|
|
explicit ReplicatedMergeTreeAddress(const String & str)
|
|
{
|
|
fromString(str);
|
|
}
|
|
|
|
void writeText(WriteBuffer & out) const;
|
|
|
|
void readText(ReadBuffer & in);
|
|
|
|
String toString() const;
|
|
|
|
void fromString(const String & str);
|
|
};
|
|
|
|
}
|