MySQL 8.0.39
Source Code Documentation
io_plugin.cc File Reference
#include "io_plugin.h"
#include <algorithm>
#include <array>
#include <map>
#include <memory>
#include <stdexcept>
#include <string>
#include <thread>
#include "my_thread.h"
#include "mysql/harness/config_option.h"
#include "mysql/harness/config_parser.h"
#include "mysql/harness/loader.h"
#include "mysql/harness/logging/logging.h"
#include "mysql/harness/net_ts/io_context.h"
#include "mysql/harness/plugin.h"
#include "mysql/harness/plugin_config.h"
#include "mysql/harness/utility/string.h"
#include "mysqlrouter/io_component.h"
#include "mysqlrouter/io_export.h"
#include "mysqlrouter/io_thread.h"

Classes

class  IoPluginConfig
 

Macros

#define MYSQL_ROUTER_LOG_DOMAIN   "io"
 
#define GET_OPTION_CHECKED(option, section, name, value)
 

Typedefs

using StringOption = mysql_harness::StringOption
 
template<class T >
using IntOption = mysql_harness::IntOption< T >
 

Functions

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

Variables

static constexpr const char kSectionName [] {"io"}
 io plugin. More...
 
static constexpr const size_t kMaxThreads {1024}
 
static constexpr std::array< const char *, 2 > supported_options
 
static std::array< const char *, 1 > required
 
mysql_harness::Plugin IO_EXPORT harness_plugin_io
 

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< const char *, 2 > supported_options
Definition: io_plugin.cc:76
static std::string get_option(const mysql_harness::ConfigSection *section, const std::string &key, const std::string &def_value)
Definition: metadata_cache_plugin.cc:107
constexpr bool str_in_collection(const T &t, const std::string_view &k)
Definition: string.h:157
case opt name
Definition: sslopt-case.h:33

◆ MYSQL_ROUTER_LOG_DOMAIN

#define MYSQL_ROUTER_LOG_DOMAIN   "io"

Typedef Documentation

◆ IntOption

template<class T >
using IntOption = mysql_harness::IntOption<T>

◆ StringOption

Function Documentation

◆ deinit()

static void deinit ( mysql_harness::PluginFuncEnv )
static

◆ init()

static void init ( mysql_harness::PluginFuncEnv env)
static

◆ run()

static void run ( mysql_harness::PluginFuncEnv )
static

Variable Documentation

◆ harness_plugin_io

mysql_harness::Plugin IO_EXPORT harness_plugin_io
Initial value:
= {
mysql_harness::PLUGIN_ABI_VERSION,
mysql_harness::ARCHITECTURE_DESCRIPTOR,
"IO",
VERSION_NUMBER(0, 0, 1),
required.size(),
required.data(),
0,
nullptr,
init,
run,
nullptr,
false,
}
static void init(mysql_harness::PluginFuncEnv *env)
Definition: io_plugin.cc:113
static void run(mysql_harness::PluginFuncEnv *)
Definition: io_plugin.cc:195
static std::array< const char *, 1 > required
Definition: io_plugin.cc:206
static void deinit(mysql_harness::PluginFuncEnv *)
Definition: io_plugin.cc:201

◆ kMaxThreads

constexpr const size_t kMaxThreads {1024}
staticconstexpr

◆ kSectionName

constexpr const char kSectionName[] {"io"}
staticconstexpr

io plugin.

manages the configuration of the io-threads and the io-backends.

◆ required

std::array<const char *, 1> required
static
Initial value:
= {{
"logger",
}}

◆ supported_options

constexpr std::array<const char *, 2> supported_options
staticconstexpr
Initial value:
{"backend",
"threads"}