1#pragma once
2#include <Core/Types.h>
3#include <IO/ReadBuffer.h>
4#include <IO/WriteBuffer.h>
5
6
7namespace DB
8{
9
10/// Lets you know where to send requests to get to the replica.
11
12struct ReplicatedMergeTreeAddress
13{
14 String host;
15 UInt16 replication_port;
16 UInt16 queries_port;
17 String database;
18 String table;
19 String scheme;
20
21 ReplicatedMergeTreeAddress() = default;
22 explicit ReplicatedMergeTreeAddress(const String & str)
23 {
24 fromString(str);
25 }
26
27 void writeText(WriteBuffer & out) const;
28
29 void readText(ReadBuffer & in);
30
31 String toString() const;
32
33 void fromString(const String & str);
34};
35
36}
37