MySQL 8.0.40
Source Code Documentation
|
Singleton class implementing registry of the built-in MySQLRouter plugins. More...
#include <builtin_plugins.h>
Classes | |
struct | PluginInfo |
Stores the information about a single built-in plugin. More... | |
Public Types | |
using | PluginsMap = std::map< std::string, PluginInfo > |
Public Member Functions | |
BuiltinPlugins (const BuiltinPlugins &)=delete | |
It's a singleton so we disable copying. More... | |
BuiltinPlugins & | operator= (const BuiltinPlugins &)=delete |
bool | has (const std::string &plugin_name) noexcept |
Checks if there is a built-in plugin with a specified name. More... | |
const PluginsMap * | get () noexcept |
Returns the map containing information about all built-in plugins in the registry. More... | |
Plugin * | get_plugin (const std::string &plugin_name) |
Returns pointer to the Plugin struct for the plugin with selected name. More... | |
void | add (std::string name, PluginInfo plugin_info) |
add plugin to the built in plugins. More... | |
Static Public Member Functions | |
static BuiltinPlugins & | instance () |
Gets the singleton instance. More... | |
Private Member Functions | |
BuiltinPlugins () | |
Private Attributes | |
PluginsMap | plugins_ |
Singleton class implementing registry of the built-in MySQLRouter plugins.
Built-in plugin is statically linked to the harness library (does not have dedicated .so or .dll file) but implements the same API as the external plugin (init(), start(), etc.) that is called by the Loader.
using mysql_harness::BuiltinPlugins::PluginsMap = std::map<std::string, PluginInfo> |
|
delete |
It's a singleton so we disable copying.
|
private |
void mysql_harness::BuiltinPlugins::add | ( | std::string | name, |
PluginInfo | plugin_info | ||
) |
add plugin to the built in plugins.
|
inlinenoexcept |
Returns the map containing information about all built-in plugins in the registry.
|
inline |
Returns pointer to the Plugin struct for the plugin with selected name.
std::out_of_range | if there is no info about the plugin with a given name. |
plugin_name | name of the plugin queried for the Plugin struct |
|
noexcept |
Checks if there is a built-in plugin with a specified name.
plugin_name | plugin name to check |
|
static |
Gets the singleton instance.
|
delete |
|
private |