MySQL 9.1.0
Source Code Documentation
mock_server_plugin.cc File Reference
#include "mock_server_plugin.h"
#include <array>
#include <climits>
#include <stdexcept>
#include <string>
#include <system_error>
#include "my_thread.h"
#include "mysql.h"
#include "mysql/harness/config_option.h"
#include "mysql/harness/config_parser.h"
#include "mysql/harness/logging/logging.h"
#include "mysql/harness/plugin.h"
#include "mysql/harness/plugin_config.h"
#include "mysql/harness/stdx/filesystem.h"
#include "mysql/harness/string_utils.h"
#include "mysql/harness/tls_context.h"
#include "mysql/harness/tls_server_context.h"
#include "mysql/harness/utility/string.h"
#include "mysql_server_mock.h"
#include "mysqlrouter/io_component.h"

Classes

class  anonymous_namespace{mock_server_plugin.cc}::SslModeOption
 
class  anonymous_namespace{mock_server_plugin.cc}::StringsOption
 
class  PluginConfig
 

Namespaces

namespace  anonymous_namespace{mock_server_plugin.cc}
 

Macros

#define GET_OPTION_CHECKED(option, section, name, value)
 

Functions

static void init (mysql_harness::PluginFuncEnv *env)
 
static void start (mysql_harness::PluginFuncEnv *env)
 
static void deinit (mysql_harness::PluginFuncEnv *)
 

Variables

constexpr const auto anonymous_namespace{mock_server_plugin.cc}::allowed_ssl_modes
 
static constexpr const char anonymous_namespace{mock_server_plugin.cc}::kSectionName [] {"mock_server"}
 
static constexpr std::array supported_options
 
Monitor< std::list< IoComponent::Workguard > > io_context_work_guards {{}}
 
static constexpr std::array required
 
mysql_harness::Plugin MOCK_SERVER_EXPORT harness_plugin_mock_server
 

Macro Definition Documentation

◆ GET_OPTION_CHECKED

#define GET_OPTION_CHECKED (   option,
  section,
  name,
  value 
)
Value:
option = get_option(section, name, value);
static constexpr std::array supported_options
Definition: mock_server_plugin.cc:107
constexpr bool str_in_collection(const T &t, const std::string_view &k)
Definition: string.h:94
case opt name
Definition: sslopt-case.h:29

Function Documentation

◆ deinit()

static void deinit ( mysql_harness::PluginFuncEnv )
static

◆ init()

static void init ( mysql_harness::PluginFuncEnv env)
static

◆ start()

static void start ( mysql_harness::PluginFuncEnv env)
static

Variable Documentation

◆ harness_plugin_mock_server

mysql_harness::Plugin MOCK_SERVER_EXPORT harness_plugin_mock_server
Initial value:
= {
mysql_harness::PLUGIN_ABI_VERSION,
mysql_harness::ARCHITECTURE_DESCRIPTOR,
"Mock MySQL Server for testing",
VERSION_NUMBER(0, 0, 1),
required.size(), required.data(),
0, nullptr,
init,
nullptr,
true,
nullptr,
}
static constexpr std::array required
Definition: mock_server_plugin.cc:343
static void init(mysql_harness::PluginFuncEnv *env)
Definition: mock_server_plugin.cc:190
static void start(mysql_harness::PluginFuncEnv *env)
Definition: mock_server_plugin.cc:215
static void deinit(mysql_harness::PluginFuncEnv *)
Definition: mock_server_plugin.cc:339

◆ io_context_work_guards

Monitor<std::list<IoComponent::Workguard> > io_context_work_guards {{}}

◆ required

constexpr std::array required
staticconstexpr
Initial value:
{
"logger",
"router_openssl",
"router_protobuf",
"io",
}

◆ supported_options

constexpr std::array supported_options
staticconstexpr
Initial value:
{
"filename", "module_prefix", "bind_address", "port", "protocol",
"ssl_ca", "ssl_capath", "ssl_cert", "ssl_key", "ssl_cipher",
"ssl_crl", "ssl_crlpath", "ssl_mode", "tls_version",
}