ClickHouse/src/Storages/MergeTree/ReplicatedMergeTreeAddress.h

37 lines
645 B
C++
Raw Normal View History

#pragma once
2020-09-15 09:55:57 +00:00
#include <common/types.h>
#include <IO/ReadBuffer.h>
#include <IO/WriteBuffer.h>
2015-10-02 18:33:46 +00:00
namespace DB
{
2017-04-16 15:00:33 +00:00
/// Lets you know where to send requests to get to the replica.
2015-10-02 18:33:46 +00:00
struct ReplicatedMergeTreeAddress
{
String host;
UInt16 replication_port;
UInt16 queries_port;
String database;
String table;
String scheme;
2015-10-02 18:33:46 +00:00
ReplicatedMergeTreeAddress() = default;
explicit ReplicatedMergeTreeAddress(const String & str)
{
fromString(str);
}
2015-10-02 18:33:46 +00:00
void writeText(WriteBuffer & out) const;
2015-10-02 18:33:46 +00:00
void readText(ReadBuffer & in);
2015-10-02 18:33:46 +00:00
String toString() const;
2015-10-02 18:33:46 +00:00
void fromString(const String & str);
2015-10-02 18:33:46 +00:00
};
}