MySQL  8.0.27
Source Code Documentation
routing_plugin.cc File Reference
#include <atomic>
#include <iostream>
#include <mutex>
#include <stdexcept>
#include <vector>
#include "dim.h"
#include "hostname_validator.h"
#include "mysql/harness/config_parser.h"
#include "mysql/harness/filesystem.h"
#include "mysql/harness/loader_config.h"
#include "mysql/harness/logging/logging.h"
#include "mysql/harness/net_ts/io_context.h"
#include "mysql/harness/tls_server_context.h"
#include "mysql/harness/utility/string.h"
#include "mysql_routing.h"
#include "mysqlrouter/destination.h"
#include "mysqlrouter/io_component.h"
#include "mysqlrouter/routing_component.h"
#include "mysqlrouter/routing_export.h"
#include "mysqlrouter/utils.h"
#include "plugin_config.h"
#include "ssl_mode.h"

Functions

static void validate_socket_info (const std::string &err_prefix, const mysql_harness::ConfigSection *section, const RoutingPluginConfig &config)
 
void validate_socket_info_test_proxy (const std::string &err_prefix, const mysql_harness::ConfigSection *section, const RoutingPluginConfig &config)
 
static void init (mysql_harness::PluginFuncEnv *env)
 
static void ensure_readable_directory (const std::string &opt_name, const std::string &opt_value)
 
static std::string get_default_ciphers ()
 
static void start (mysql_harness::PluginFuncEnv *env)
 
static void deinit (mysql_harness::PluginFuncEnv *)
 

Variables

const mysql_harness::AppInfo * g_app_info
 
static const string kSectionName = "routing"
 
std::mutex io_context_work_guard_mtx
 
std::list< IoComponent::Workguardio_context_work_guards
 
static const std::array< const char *, 4 > required
 
mysql_harness::Plugin ROUTING_EXPORT harness_plugin_routing
 

Function Documentation

◆ deinit()

static void deinit ( mysql_harness::PluginFuncEnv )
static

◆ ensure_readable_directory()

static void ensure_readable_directory ( const std::string &  opt_name,
const std::string &  opt_value 
)
static

◆ get_default_ciphers()

static std::string get_default_ciphers ( )
static

◆ init()

static void init ( mysql_harness::PluginFuncEnv env)
static

◆ start()

static void start ( mysql_harness::PluginFuncEnv env)
static

◆ validate_socket_info()

static void validate_socket_info ( const std::string &  err_prefix,
const mysql_harness::ConfigSection section,
const RoutingPluginConfig config 
)
static

◆ validate_socket_info_test_proxy()

void validate_socket_info_test_proxy ( const std::string &  err_prefix,
const mysql_harness::ConfigSection section,
const RoutingPluginConfig config 
)

Variable Documentation

◆ g_app_info

const mysql_harness::AppInfo* g_app_info

◆ harness_plugin_routing

mysql_harness::Plugin ROUTING_EXPORT harness_plugin_routing
Initial value:
= {
mysql_harness::PLUGIN_ABI_VERSION,
mysql_harness::ARCHITECTURE_DESCRIPTOR,
"Routing MySQL connections between MySQL clients/connectors and "
"servers",
VERSION_NUMBER(0, 0, 1),
required.size(), required.data(),
0, nullptr,
init,
nullptr,
true,
}
static void init(mysql_harness::PluginFuncEnv *env)
Definition: routing_plugin.cc:137
static const std::array< const char *, 4 > required
Definition: routing_plugin.cc:445
static void start(mysql_harness::PluginFuncEnv *env)
Definition: routing_plugin.cc:247
static void deinit(mysql_harness::PluginFuncEnv *)
Definition: routing_plugin.cc:440

◆ io_context_work_guard_mtx

std::mutex io_context_work_guard_mtx

◆ io_context_work_guards

std::list<IoComponent::Workguard> io_context_work_guards

◆ kSectionName

const string kSectionName = "routing"
static

◆ required

const std::array<const char *, 4> required
static
Initial value:
= {{
"logger",
"router_protobuf",
"router_openssl",
"io",
}}