MySQL 26.10.0
Source Code Documentation
mrs_component_server_config.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2026, Oracle and/or its affiliates.
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License, version 2.0,
6 as published by the Free Software Foundation.
7
8 This program is designed to work with certain software (including
9 but not limited to OpenSSL) that is licensed under separate terms,
10 as designated in a particular file or component or in included license
11 documentation. The authors of MySQL hereby grant you an additional
12 permission to link the program and your derivative works with the
13 separately licensed software that they have either included with
14 the program or referenced in the documentation.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24*/
25
26#ifndef MRS_COMPONENT_SERVER_CONFIG_H
27#define MRS_COMPONENT_SERVER_CONFIG_H
28
29#include <string>
30
31namespace mrs_component {
32
33/**
34 Holds the Server configuration required by the MRS component.
35*/
37 public:
38 ServerConfig() = default;
39 ~ServerConfig() = default;
40 ServerConfig(const ServerConfig &) = delete;
44
45 std::string m_basedir;
46 std::string m_datadir;
47 std::string m_log_level;
48 std::string m_hostname;
49 std::string m_port;
50 std::string m_server_id;
51 std::string m_server_uuid;
52 std::string m_ssl_cert;
53 std::string m_ssl_key;
54 std::string m_ssl_cipher;
55 std::string m_bind_address;
56 std::string m_socket;
57
60
61 private:
62 int get_sysvar_value(const std::string &name, std::string &value) const;
63 int get_have_ssl(bool &value) const;
64};
65
66} // namespace mrs_component
67
68#endif // MRS_COMPONENT_SERVER_CONFIG_H
Holds the Server configuration required by the MRS component.
Definition: mrs_component_server_config.h:36
std::string m_ssl_key
Definition: mrs_component_server_config.h:53
ServerConfig & operator=(ServerConfig &&)=delete
std::string m_ssl_cipher
Definition: mrs_component_server_config.h:54
std::string m_socket
Definition: mrs_component_server_config.h:56
ServerConfig(const ServerConfig &)=delete
int fetch_required_sysvars()
Definition: mrs_component_server_config.cc:113
ServerConfig & operator=(const ServerConfig &)=delete
int get_sysvar_value(const std::string &name, std::string &value) const
Definition: mrs_component_server_config.cc:35
std::string m_basedir
Definition: mrs_component_server_config.h:45
std::string m_datadir
Definition: mrs_component_server_config.h:46
std::string m_port
Definition: mrs_component_server_config.h:49
std::string m_ssl_cert
Definition: mrs_component_server_config.h:52
std::string m_log_level
Definition: mrs_component_server_config.h:47
std::string m_server_id
Definition: mrs_component_server_config.h:50
int get_have_ssl(bool &value) const
Definition: mrs_component_server_config.cc:60
std::string m_server_uuid
Definition: mrs_component_server_config.h:51
std::string m_hostname
Definition: mrs_component_server_config.h:48
bool requires_local_authentication() const
Definition: mrs_component_server_config.cc:104
ServerConfig(ServerConfig &&)=delete
std::string m_bind_address
Definition: mrs_component_server_config.h:55
ValueType value(const std::optional< ValueType > &v)
Definition: gtid.h:83
Definition: mrs_component.cc:137