MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
MySQLRouterConf Class Reference

#include <router_conf.h>

Inheritance diagram for MySQLRouterConf:
[legend]

Public Member Functions

 MySQLRouterConf (KeyringInfo &keyring_info, std::ostream &out_stream=std::cout, std::ostream &err_stream=std::cerr)
 
virtual ~MySQLRouterConf ()=default
 
virtual void prepare_command_options (CmdArgHandler &arg_handler, const std::string &bootstrap_uri="") noexcept
 
bool is_bootstrap () const
 
virtual bool is_legacy () const
 
bool skipped () const
 
void add_option (const std::string &key, const std::string &value)
 
const std::map< std::string, std::string > & bootstrap_options () const
 
void connect ()
 
mysqlrouter::MySQLSessionsession () const
 
std::string bootstrap (const std::string &program_name, const mysql_harness::Path &origin, bool allow_standalone, const std::string &plugin_folder, mysqlrouter::SysUserOperationsBase *sys_user_operations=nullptr)
 
std::map< std::string, std::string > get_config_cmdln_options () const
 

Protected Member Functions

void save_bootstrap_option_not_empty (const std::string &option_name, const std::string &save_name, const std::string &option_value)
 Saves the selected command line option in the internal options array after verifying it's value not empty and the router is doing bootstrap. More...
 
void assert_bootstrap_mode (const std::string &option_name) const
 verify that bootstrap option (–bootstrap or -B) was given by user. More...
 
int get_connect_timeout () const
 
int get_read_timeout () const
 
std::string get_bootstrap_socket () const
 

Protected Attributes

std::string bootstrap_uri_
 Value of the argument passed to the -B or –bootstrap command line option for bootstrapping. More...
 
std::string bootstrap_directory_
 Valueof the argument passed to the –directory command line option. More...
 
std::map< std::string, std::string > bootstrap_options_
 key/value map of additional configuration options for bootstrap More...
 
std::map< std::string, std::vector< std::string > > bootstrap_multivalue_options_
 key/list-of-values map of additional configuration options for bootstrap More...
 
mysqlrouter::URI target_uri_
 
std::unique_ptr< mysqlrouter::MySQLSessionmysql_
 
KeyringInfokeyring_info_
 
bool skipped_ = false
 
std::ostream & out_stream_
 
std::ostream & err_stream_
 
std::string plugin_folder_
 

Friends

class MySQLRouter
 

Constructor & Destructor Documentation

◆ MySQLRouterConf()

MySQLRouterConf::MySQLRouterConf ( KeyringInfo keyring_info,
std::ostream &  out_stream = std::cout,
std::ostream &  err_stream = std::cerr 
)
inline

◆ ~MySQLRouterConf()

virtual MySQLRouterConf::~MySQLRouterConf ( )
virtualdefault

Member Function Documentation

◆ add_option()

void MySQLRouterConf::add_option ( const std::string &  key,
const std::string &  value 
)
inline

◆ assert_bootstrap_mode()

void MySQLRouterConf::assert_bootstrap_mode ( const std::string &  option_name) const
protected

verify that bootstrap option (–bootstrap or -B) was given by user.

Exceptions
std::runtime_errorif called in non-bootstrap mode.

◆ bootstrap()

std::string MySQLRouterConf::bootstrap ( const std::string &  program_name,
const mysql_harness::Path origin,
bool  allow_standalone,
const std::string &  plugin_folder,
mysqlrouter::SysUserOperationsBase sys_user_operations = nullptr 
)

◆ bootstrap_options()

const std::map< std::string, std::string > & MySQLRouterConf::bootstrap_options ( ) const
inline

◆ connect()

void MySQLRouterConf::connect ( )

◆ get_bootstrap_socket()

std::string MySQLRouterConf::get_bootstrap_socket ( ) const
protected

◆ get_config_cmdln_options()

std::map< std::string, std::string > MySQLRouterConf::get_config_cmdln_options ( ) const

◆ get_connect_timeout()

int MySQLRouterConf::get_connect_timeout ( ) const
protected

◆ get_read_timeout()

int MySQLRouterConf::get_read_timeout ( ) const
protected

◆ is_bootstrap()

bool MySQLRouterConf::is_bootstrap ( ) const
inline

◆ is_legacy()

virtual bool MySQLRouterConf::is_legacy ( ) const
inlinevirtual

◆ prepare_command_options()

void MySQLRouterConf::prepare_command_options ( CmdArgHandler arg_handler,
const std::string &  bootstrap_uri = "" 
)
virtualnoexcept

◆ save_bootstrap_option_not_empty()

void MySQLRouterConf::save_bootstrap_option_not_empty ( const std::string &  option_name,
const std::string &  save_name,
const std::string &  option_value 
)
protected

Saves the selected command line option in the internal options array after verifying it's value not empty and the router is doing bootstrap.

Throws: std::runtime_error

◆ session()

mysqlrouter::MySQLSession * MySQLRouterConf::session ( ) const
inline

◆ skipped()

bool MySQLRouterConf::skipped ( ) const
inline

Friends And Related Function Documentation

◆ MySQLRouter

friend class MySQLRouter
friend

Member Data Documentation

◆ bootstrap_directory_

std::string MySQLRouterConf::bootstrap_directory_
protected

Valueof the argument passed to the –directory command line option.

◆ bootstrap_multivalue_options_

std::map<std::string, std::vector<std::string> > MySQLRouterConf::bootstrap_multivalue_options_
protected

key/list-of-values map of additional configuration options for bootstrap

◆ bootstrap_options_

std::map<std::string, std::string> MySQLRouterConf::bootstrap_options_
protected

key/value map of additional configuration options for bootstrap

◆ bootstrap_uri_

std::string MySQLRouterConf::bootstrap_uri_
protected

Value of the argument passed to the -B or –bootstrap command line option for bootstrapping.

◆ err_stream_

std::ostream& MySQLRouterConf::err_stream_
protected

◆ keyring_info_

KeyringInfo& MySQLRouterConf::keyring_info_
protected

◆ mysql_

std::unique_ptr<mysqlrouter::MySQLSession> MySQLRouterConf::mysql_
protected

◆ out_stream_

std::ostream& MySQLRouterConf::out_stream_
protected

◆ plugin_folder_

std::string MySQLRouterConf::plugin_folder_
protected

◆ skipped_

bool MySQLRouterConf::skipped_ = false
protected

◆ target_uri_

mysqlrouter::URI MySQLRouterConf::target_uri_
protected

The documentation for this class was generated from the following files: