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

#include <bootstrap_configurator.h>

Classes

class  MySQLRouterAndMrsConf
 
struct  RoutingConfig
 

Public Member Functions

 BootstrapConfigurator (std::ostream &out_stream, std::ostream &err_stream)
 
void init (int argc, char **argv)
 
void run ()
 

Static Public Member Functions

static void init_main_logger (mysql_harness::LoaderConfig &config, bool raw_mode=false)
 

Private Member Functions

std::pair< RoutingConfig, RoutingConfigget_config_classic_sections () const
 
void parse_command_options (std::vector< std::string > arguments)
 
void prepare_command_options (const std::string &bootstrap_uri)
 
std::string get_version_line () noexcept
 
void show_help ()
 
void show_usage () noexcept
 
void configure_mrs (mysqlrouter::MySQLSession *session, const std::string &config_path, const std::map< std::string, std::string > &config_cmdln_options)
 
void check_mrs_metadata (mysqlrouter::MySQLSession *session) const
 
void load_configuration (const std::string &path)
 
bool can_configure_mrs (const std::string &config_path) const
 
void create_mrs_users (mysqlrouter::MySQLSession *session, uint64_t mrs_router_id)
 
void store_mrs_data_in_keyring ()
 
void store_mrs_configuration (const std::string &config_path, uint64_t mrs_router_id, const std::map< std::string, std::string > &config_cmdln_options)
 
uint64_t register_mrs_router_instance (mysqlrouter::MySQLSession *session)
 
std::string get_configured_rest_endpoint () const
 
void store_mrs_developer (mysqlrouter::MySQLSession *session, uint64_t mrs_router_id, const std::string &developer_name)
 
void store_mrs_account_metadata (mysqlrouter::MySQLSession *session, uint64_t mrs_router_id, const std::string &key, const std::string &user, const std::vector< std::string > &hosts)
 

Private Attributes

std::string router_program_name_
 
mysql_harness::Path origin_
 
CmdArgHandler arg_handler_
 
KeyringHandler keyring_
 
MySQLRouterAndMrsConf bootstrapper_
 
BootstrapCredentials mrs_metadata_account_
 
BootstrapCredentials mrs_data_account_
 
std::string mrs_secret_
 
std::string bootstrap_mrs_developer_
 
std::string bootstrap_mrs_developer_debug_port_
 
bool bootstrap_mrs_ {false}
 
bool is_legacy_ {true}
 
bool showing_info_ {false}
 
std::vector< std::string > config_files_
 
mysql_harness::Config config_ {mysql_harness::Config::allow_keys}
 

Constructor & Destructor Documentation

◆ BootstrapConfigurator()

BootstrapConfigurator::BootstrapConfigurator ( std::ostream &  out_stream,
std::ostream &  err_stream 
)

Member Function Documentation

◆ can_configure_mrs()

bool BootstrapConfigurator::can_configure_mrs ( const std::string &  config_path) const
private

◆ check_mrs_metadata()

void BootstrapConfigurator::check_mrs_metadata ( mysqlrouter::MySQLSession session) const
private

◆ configure_mrs()

void BootstrapConfigurator::configure_mrs ( mysqlrouter::MySQLSession session,
const std::string &  config_path,
const std::map< std::string, std::string > &  config_cmdln_options 
)
private

◆ create_mrs_users()

void BootstrapConfigurator::create_mrs_users ( mysqlrouter::MySQLSession session,
uint64_t  mrs_router_id 
)
private

◆ get_config_classic_sections()

std::pair< BootstrapConfigurator::RoutingConfig, BootstrapConfigurator::RoutingConfig > BootstrapConfigurator::get_config_classic_sections ( ) const
private

◆ get_configured_rest_endpoint()

std::string BootstrapConfigurator::get_configured_rest_endpoint ( ) const
private

◆ get_version_line()

std::string BootstrapConfigurator::get_version_line ( )
privatenoexcept

◆ init()

void BootstrapConfigurator::init ( int  argc,
char **  argv 
)

◆ init_main_logger()

void BootstrapConfigurator::init_main_logger ( mysql_harness::LoaderConfig config,
bool  raw_mode = false 
)
static

◆ load_configuration()

void BootstrapConfigurator::load_configuration ( const std::string &  path)
private

◆ parse_command_options()

void BootstrapConfigurator::parse_command_options ( std::vector< std::string >  arguments)
private

◆ prepare_command_options()

void BootstrapConfigurator::prepare_command_options ( const std::string &  bootstrap_uri)
private

◆ register_mrs_router_instance()

uint64_t BootstrapConfigurator::register_mrs_router_instance ( mysqlrouter::MySQLSession session)
private

◆ run()

void BootstrapConfigurator::run ( )

◆ show_help()

void BootstrapConfigurator::show_help ( )
private

◆ show_usage()

void BootstrapConfigurator::show_usage ( )
privatenoexcept

◆ store_mrs_account_metadata()

void BootstrapConfigurator::store_mrs_account_metadata ( mysqlrouter::MySQLSession session,
uint64_t  mrs_router_id,
const std::string &  key,
const std::string &  user,
const std::vector< std::string > &  hosts 
)
private

◆ store_mrs_configuration()

void BootstrapConfigurator::store_mrs_configuration ( const std::string &  config_path,
uint64_t  mrs_router_id,
const std::map< std::string, std::string > &  config_cmdln_options 
)
private

◆ store_mrs_data_in_keyring()

void BootstrapConfigurator::store_mrs_data_in_keyring ( )
private

◆ store_mrs_developer()

void BootstrapConfigurator::store_mrs_developer ( mysqlrouter::MySQLSession session,
uint64_t  mrs_router_id,
const std::string &  developer_name 
)
private

Member Data Documentation

◆ arg_handler_

CmdArgHandler BootstrapConfigurator::arg_handler_
private

◆ bootstrap_mrs_

bool BootstrapConfigurator::bootstrap_mrs_ {false}
private

◆ bootstrap_mrs_developer_

std::string BootstrapConfigurator::bootstrap_mrs_developer_
private

◆ bootstrap_mrs_developer_debug_port_

std::string BootstrapConfigurator::bootstrap_mrs_developer_debug_port_
private

◆ bootstrapper_

MySQLRouterAndMrsConf BootstrapConfigurator::bootstrapper_
private

◆ config_

mysql_harness::Config BootstrapConfigurator::config_ {mysql_harness::Config::allow_keys}
private

◆ config_files_

std::vector<std::string> BootstrapConfigurator::config_files_
private

◆ is_legacy_

bool BootstrapConfigurator::is_legacy_ {true}
private

◆ keyring_

KeyringHandler BootstrapConfigurator::keyring_
private

◆ mrs_data_account_

BootstrapCredentials BootstrapConfigurator::mrs_data_account_
private

◆ mrs_metadata_account_

BootstrapCredentials BootstrapConfigurator::mrs_metadata_account_
private

◆ mrs_secret_

std::string BootstrapConfigurator::mrs_secret_
private

◆ origin_

mysql_harness::Path BootstrapConfigurator::origin_
private

◆ router_program_name_

std::string BootstrapConfigurator::router_program_name_
private

◆ showing_info_

bool BootstrapConfigurator::showing_info_ {false}
private

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