MySQL 9.4.0
Source Code Documentation
configuration.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2021, 2025, 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 ROUTER_SRC_REST_MRS_SRC_MRS_CONFIG_H_
27#define ROUTER_SRC_REST_MRS_SRC_MRS_CONFIG_H_
28
29#include <memory>
30#include <optional>
31#include <set>
32#include <string>
33#include <vector>
34
35#include <mysql.h>
36
40
41#include "secure_string.h" // NOLINT(build/include_subdir)
42
43namespace mrs {
44
46
47constexpr const char *kHostOnResolveFailed = "unknown";
48
50 public: // Option fetched from configuration file
51 std::string mysql_user_;
55
57
58 std::string routing_ro_;
59 std::string routing_rw_;
60 uint64_t router_id_;
61 std::optional<std::string> router_name_;
63 uint32_t http_port_;
64
65 // how many seconds the schema monitor should wait before starting, for the
66 // "mysql_user_data_access" user to get a proper access granted
68
69 // show the "in_development" services for this developer
70 std::string developer_;
72
73 public: // Options fetched from other plugins
75
76 std::shared_ptr<collector::DestinationProvider> provider_rw_;
77 std::shared_ptr<collector::DestinationProvider> provider_ro_;
78 std::string jwt_secret_;
80};
81
82} // namespace mrs
83
84#endif // ROUTER_SRC_REST_MRS_SRC_MRS_CONFIG_H_
Definition: configuration.h:49
mysql_harness::SecureString mysql_user_password_
Definition: configuration.h:52
std::string developer_debug_port_
Definition: configuration.h:71
std::string routing_rw_
Definition: configuration.h:59
mysql_harness::MakeSharedPtr< helper::PluginMonitor > service_monitor_
Definition: configuration.h:79
std::string mysql_user_
Definition: configuration.h:51
bool is_https_
Definition: configuration.h:74
std::string routing_ro_
Definition: configuration.h:58
std::shared_ptr< collector::DestinationProvider > provider_rw_
Definition: configuration.h:76
std::optional< std::string > router_name_
Definition: configuration.h:61
mysql_harness::SecureString mysql_user_data_access_password_
Definition: configuration.h:54
std::chrono::seconds wait_for_metadata_schema_access_
Definition: configuration.h:67
std::chrono::milliseconds metadata_refresh_interval_
Definition: configuration.h:56
std::shared_ptr< collector::DestinationProvider > provider_ro_
Definition: configuration.h:77
uint32_t http_port_
Definition: configuration.h:63
std::string developer_
Definition: configuration.h:70
uint32_t default_mysql_cache_instances_
Definition: configuration.h:62
uint64_t router_id_
Definition: configuration.h:60
std::string jwt_secret_
Definition: configuration.h:78
std::string mysql_user_data_access_
Definition: configuration.h:53
Definition: make_shared_ptr.h:35
Null-terminated string which is securely wiped on destruction.
Definition: secure_string.h:59
This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient.
std::chrono::seconds seconds
Definition: authorize_manager.cc:68
std::chrono::milliseconds milliseconds
Definition: authorize_manager.cc:67
Definition: authorize_manager.h:48
Authentication
Definition: configuration.h:45
@ kAuthenticationBasic2Server
Definition: configuration.h:45
@ kAuthenticationNone
Definition: configuration.h:45
constexpr const char * kHostOnResolveFailed
Definition: configuration.h:47