MySQL 8.0.39
Source Code Documentation
Recovery_endpoints Class Reference

Validate recovery endpoints. More...

#include <recovery_endpoints.h>

Inheritance diagram for Recovery_endpoints:
[legend]

Protected Types

enum class  enum_status { OK = 0 , INVALID , BADFORMAT , ERROR }
 This enumeration describes error status. More...
 

Protected Member Functions

 Recovery_endpoints ()
 Recovery_endpoints constructor. More...
 
virtual ~Recovery_endpoints ()
 Recovery_endpoints destructor. More...
 
std::pair< enum_status, std::string > check (const char *endpoints)
 Validate recovery endpoints and log errors if it fails. More...
 
std::vector< std::pair< std::string, uint > > get_endpoints ()
 Return recovery endpoints. More...
 
void set_port_settings (uint mysqld_port, uint admin_port)
 Set ports allowed on advertised recovery endpoints. More...
 

Private Member Functions

int hostname_check_and_log (std::string host, std::set< std::string > host_ips)
 Validate if recovery endpoint is a host name. More...
 
int local_interfaces_ips (std::set< std::string > &local_ips)
 Retrieve from host all ip address. More...
 

Private Attributes

uint m_mysqld_port
 Mysql bind port. More...
 
uint m_mysqld_admin_port
 Mysql bind admin port. More...
 
std::vector< std::pair< std::string, uint > > m_endpoints
 Advertised recovery valid endpoints. More...
 
bool m_remote
 Recovery endpoints are from donor. More...
 

Detailed Description

Validate recovery endpoints.

Member Enumeration Documentation

◆ enum_status

enum class Recovery_endpoints::enum_status
strongprotected

This enumeration describes error status.

Enumerator
OK 
INVALID 
BADFORMAT 
ERROR 

Constructor & Destructor Documentation

◆ Recovery_endpoints()

Recovery_endpoints::Recovery_endpoints ( )
protected

Recovery_endpoints constructor.

◆ ~Recovery_endpoints()

Recovery_endpoints::~Recovery_endpoints ( )
protectedvirtualdefault

Recovery_endpoints destructor.

Member Function Documentation

◆ check()

std::pair< Recovery_endpoints::enum_status, std::string > Recovery_endpoints::check ( const char *  endpoints)
protected

Validate recovery endpoints and log errors if it fails.

Parameters
endpointsadvertised recovery endpoints
Returns
the operation status
Return values
falseOK
trueError

◆ get_endpoints()

std::vector< std::pair< std::string, uint > > Recovery_endpoints::get_endpoints ( )
protected

Return recovery endpoints.

Returns
list with recovery endpoints

◆ hostname_check_and_log()

int Recovery_endpoints::hostname_check_and_log ( std::string  host,
std::set< std::string >  host_ips 
)
private

Validate if recovery endpoint is a host name.

Parameters
hosthostname to be checked
host_ipslist of host IPs
Returns
the operation status
Return values
0OK
!=0Error

◆ local_interfaces_ips()

int Recovery_endpoints::local_interfaces_ips ( std::set< std::string > &  local_ips)
private

Retrieve from host all ip address.

Parameters
[out]local_ipslist of IPs present on host
Returns
the operation status
Return values
0OK
!=0Error

◆ set_port_settings()

void Recovery_endpoints::set_port_settings ( uint  mysqld_port,
uint  admin_port 
)
protected

Set ports allowed on advertised recovery endpoints.

It shall be called when validating local recovery endpoints.

Parameters
mysqld_portmysqld port allowed on advertised recovery endpoints
admin_portmysqld admin port allowed on advertised recovery endpoints

Member Data Documentation

◆ m_endpoints

std::vector<std::pair<std::string, uint> > Recovery_endpoints::m_endpoints
private

Advertised recovery valid endpoints.

◆ m_mysqld_admin_port

uint Recovery_endpoints::m_mysqld_admin_port
private

Mysql bind admin port.

◆ m_mysqld_port

uint Recovery_endpoints::m_mysqld_port
private

Mysql bind port.

◆ m_remote

bool Recovery_endpoints::m_remote
private

Recovery endpoints are from donor.


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