MySQL 8.0.40
Source Code Documentation
router_app.cc File Reference
#include "router_app.h"
#include <algorithm>
#include <cerrno>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <initializer_list>
#include <memory>
#include <sstream>
#include <stdexcept>
#include <string>
#include <system_error>
#include <vector>
#include "common.h"
#include "config_generator.h"
#include "dim.h"
#include "harness_assert.h"
#include "hostname_validator.h"
#include "keyring/keyring_manager.h"
#include "mysql/harness/arg_handler.h"
#include "mysql/harness/config_parser.h"
#include "mysql/harness/dynamic_state.h"
#include "mysql/harness/filesystem.h"
#include "mysql/harness/log_reopen_component.h"
#include "mysql/harness/logging/logger_plugin.h"
#include "mysql/harness/logging/logging.h"
#include "mysql/harness/logging/registry.h"
#include "mysql/harness/process_state_component.h"
#include "mysql/harness/signal_handler.h"
#include "mysql/harness/utility/string.h"
#include "mysql/harness/vt100.h"
#include "mysqlrouter/config_files.h"
#include "mysqlrouter/default_paths.h"
#include "mysqlrouter/mysql_session.h"
#include "mysqlrouter/supported_router_options.h"
#include "mysqlrouter/utils.h"
#include "print_version.h"
#include "router_config.h"
#include "scope_guard.h"
#include "welcome_copyright_notice.h"
#include <fcntl.h>
#include <unistd.h>
#include <csignal>

Namespaces

namespace  anonymous_namespace{router_app.cc}
 

Macros

#define MYSQL_ROUTER_LOG_DOMAIN    ::mysql_harness::logging::kMainLogger
 

Functions

void anonymous_namespace{router_app.cc}::check_and_add_conf (std::vector< std::string > &configs, const std::string &value)
 
void anonymous_namespace{router_app.cc}::check_config_overwrites (const CmdArgHandler::ConfigOverwrites &overwrites, bool is_bootstrap)
 
static std::string make_upper (std::string s)
 upper-case a string. More...
 
static void assert_one_of_ci (const std::string &key, const std::string &value, std::initializer_list< const char * > allowed_values)
 assert 'value' is one of the allowed values. More...
 
static void markup_configfile (std::ostream &os, const std::string &filename)
 
static std::pair< bool, CmdOptioncmd_option_acceptor (const std::string &section, const std::set< std::string > &accepted_opts, const CmdOption &opt)
 filter CmdOption by section. More...
 

Variables

const char dir_sep = '/'
 
const std::string path_sep = ":"
 
static const char * kDefaultKeyringFileName = "keyring"
 
static const char kProgramName [] = "mysqlrouter"
 

Macro Definition Documentation

◆ MYSQL_ROUTER_LOG_DOMAIN

#define MYSQL_ROUTER_LOG_DOMAIN    ::mysql_harness::logging::kMainLogger

Function Documentation

◆ assert_one_of_ci()

static void assert_one_of_ci ( const std::string &  key,
const std::string &  value,
std::initializer_list< const char * >  allowed_values 
)
static

assert 'value' is one of the allowed values.

value is compared case-insensitive

Parameters
keykey name to report in case of failure
valuevalue to check
allowed_valuesallowed values.
Exceptions
std::invalid_argumentif value is not part of allowed_values.

◆ cmd_option_acceptor()

static std::pair< bool, CmdOption > cmd_option_acceptor ( const std::string &  section,
const std::set< std::string > &  accepted_opts,
const CmdOption opt 
)
static

filter CmdOption by section.

makes options "required" if needed for the usage output

◆ make_upper()

static std::string make_upper ( std::string  s)
static

upper-case a string.

◆ markup_configfile()

static void markup_configfile ( std::ostream &  os,
const std::string &  filename 
)
static

Variable Documentation

◆ dir_sep

const char dir_sep = '/'

◆ kDefaultKeyringFileName

const char* kDefaultKeyringFileName = "keyring"
static

◆ kProgramName

const char kProgramName[] = "mysqlrouter"
static

◆ path_sep

const std::string path_sep = ":"