MySQL 8.4.2
Source Code Documentation
gcs_xcom_utils.h File Reference

Go to the source code of this file.

Classes

class  Gcs_xcom_utils
 

Macros

#define XCOM_PREFIX   "[XCOM] "
 

Functions

std::string gcs_protocol_to_mysql_version (Gcs_protocol_version protocol)
 Converts the given GCS protocol version into the MySQL version that introduced it. More...
 
bool is_number (const std::string &s)
 Checks whether the given string is a number or not. More...
 
bool is_valid_hostname (const std::string &server_and_port)
 Parses the string "host:port" and checks if it is correct. More...
 
bool is_valid_protocol (std::string const &protocol)
 Checks whether the given string is a valid GCS protocol known by this node. More...
 
void fix_parameters_syntax (Gcs_interface_parameters &params)
 Does some transformations on the parameters. More...
 
bool is_parameters_syntax_correct (const Gcs_interface_parameters &params, Network_namespace_manager *netns_manager)
 Checks that parameters are syntactically valid. More...
 

Macro Definition Documentation

◆ XCOM_PREFIX

#define XCOM_PREFIX   "[XCOM] "

Function Documentation

◆ fix_parameters_syntax()

void fix_parameters_syntax ( Gcs_interface_parameters params)

Does some transformations on the parameters.

For instance, replaces aliases with the correct ones

◆ gcs_protocol_to_mysql_version()

std::string gcs_protocol_to_mysql_version ( Gcs_protocol_version  protocol)

Converts the given GCS protocol version into the MySQL version that introduced it.

Parameters
protocolthe GCS protocol
Returns
the MySQL version that introduced it, in format major.minor.patch

◆ is_number()

bool is_number ( const std::string &  s)
inline

Checks whether the given string is a number or not.

Parameters
sthe string to check.
Returns
true if it is a number, false otherwise.

◆ is_parameters_syntax_correct()

bool is_parameters_syntax_correct ( const Gcs_interface_parameters params,
Network_namespace_manager netns_manager 
)

Checks that parameters are syntactically valid.

Parameters
paramsThe parameters to validate syntactically.
netns_managerA reference to a Network Namespace Manager. This is needed because of the allowlist configuration and local address validation.
Returns
false if there is a syntax error, true otherwise.

◆ is_valid_hostname()

bool is_valid_hostname ( const std::string &  server_and_port)

Parses the string "host:port" and checks if it is correct.

Parameters
server_and_portthe server hostname and port in the form hostname:port.
Returns
true if it is a valid URL, false otherwise.

◆ is_valid_protocol()

bool is_valid_protocol ( std::string const &  protocol)

Checks whether the given string is a valid GCS protocol known by this node.

Returns
true If it is, false otherwise.