MySQL 8.0.40
Source Code Documentation
Gcs_mysql_network_provider_native_interface Class Referenceabstract

IoC interface to allow abstraction of MySQL Client API. More...

#include <gcs_mysql_network_provider.h>

Inheritance diagram for Gcs_mysql_network_provider_native_interface:
[legend]

Public Member Functions

virtual ~Gcs_mysql_network_provider_native_interface ()
 
virtual MYSQLmysql_real_connect (MYSQL *mysql, const char *host, const char *user, const char *passwd, const char *db, unsigned int port, const char *unix_socket, unsigned long clientflag)=0
 Proxy method to mysql_real_connect from the MySQL client API. More...
 
virtual bool send_command (MYSQL *mysql, enum enum_server_command command, const unsigned char *arg, size_t length, bool skip_check)=0
 Proxy method to simple_command from the MySQL client API. More...
 
virtual MYSQLmysql_init (MYSQL *sock)=0
 Proxy method to mysql_init from the MySQL Client API. More...
 
virtual void mysql_close (MYSQL *sock)=0
 Proxy method to mysql_close from the MySQL Client API. More...
 
virtual int channel_get_network_namespace (std::string &net_ns)=0
 Method to get the network namespace configured for a channel. More...
 
virtual bool set_network_namespace (const std::string &network_namespace)=0
 Set active network namespace specified by a name. More...
 
virtual bool restore_original_network_namespace ()=0
 Restore original network namespace used to be active before a new network namespace has been set. More...
 
virtual void mysql_free (void *ptr)=0
 Proxy method to mysql_free from the MySQL Memory API. More...
 
virtual int mysql_options (MYSQL *mysql, enum mysql_option option, const void *arg)=0
 Proxy method to mysql_options from the MySQL Memory API. More...
 
virtual bool mysql_ssl_set (MYSQL *mysql, const char *key, const char *cert, const char *ca, const char *capath, const char *cipher)=0
 Proxy method to mysql_ssl_set from the MySQL Memory API. More...
 

Detailed Description

IoC interface to allow abstraction of MySQL Client API.

Constructor & Destructor Documentation

◆ ~Gcs_mysql_network_provider_native_interface()

virtual Gcs_mysql_network_provider_native_interface::~Gcs_mysql_network_provider_native_interface ( )
inlinevirtual

Member Function Documentation

◆ channel_get_network_namespace()

virtual int Gcs_mysql_network_provider_native_interface::channel_get_network_namespace ( std::string &  net_ns)
pure virtual

Method to get the network namespace configured for a channel.

Parameters
[out]net_nsThe network namespace to extract
Returns
the operation status
Return values
falseOK
trueError, channel not found

Implemented in Gcs_mysql_network_provider_native_interface_impl.

◆ mysql_close()

virtual void Gcs_mysql_network_provider_native_interface::mysql_close ( MYSQL sock)
pure virtual

Proxy method to mysql_close from the MySQL Client API.

Parameters
sockthe connection to close

Implemented in Gcs_mysql_network_provider_native_interface_impl.

◆ mysql_free()

virtual void Gcs_mysql_network_provider_native_interface::mysql_free ( void *  ptr)
pure virtual

Proxy method to mysql_free from the MySQL Memory API.

Parameters
ptrthe pointer to free

Implemented in Gcs_mysql_network_provider_native_interface_impl.

◆ mysql_init()

virtual MYSQL * Gcs_mysql_network_provider_native_interface::mysql_init ( MYSQL sock)
pure virtual

Proxy method to mysql_init from the MySQL Client API.

Parameters
sockthe connection to initialize

Implemented in Gcs_mysql_network_provider_native_interface_impl.

◆ mysql_options()

virtual int Gcs_mysql_network_provider_native_interface::mysql_options ( MYSQL mysql,
enum mysql_option  option,
const void *  arg 
)
pure virtual

Proxy method to mysql_options from the MySQL Memory API.

Parameters
mysqlconnection to set an option
optionoption to set
argvalue of the option to set
Returns
int > 0 in case of error.

Implemented in Gcs_mysql_network_provider_native_interface_impl.

◆ mysql_real_connect()

virtual MYSQL * Gcs_mysql_network_provider_native_interface::mysql_real_connect ( MYSQL mysql,
const char *  host,
const char *  user,
const char *  passwd,
const char *  db,
unsigned int  port,
const char *  unix_socket,
unsigned long  clientflag 
)
pure virtual

Proxy method to mysql_real_connect from the MySQL client API.

Parameters
mysqlmysql client connection reference. Must have been initializaed with mysql_init
hosthostname to connect
userusername for the connection
passwdpassword for the connection
dbdatabase/schema to use
portremote port to connect
unix_socketunix socket file (if applicable)
clientflagclient flags
Returns
MYSQL* a mysql client connection.

Implemented in Gcs_mysql_network_provider_native_interface_impl.

◆ mysql_ssl_set()

virtual bool Gcs_mysql_network_provider_native_interface::mysql_ssl_set ( MYSQL mysql,
const char *  key,
const char *  cert,
const char *  ca,
const char *  capath,
const char *  cipher 
)
pure virtual

Proxy method to mysql_ssl_set from the MySQL Memory API.

Parameters
mysqlconnection to set SSL options
keyconnection key
certconnection certificate
caconnection CA
capaththe CA path
ciphercipher to use
Returns
true in case of error;
false otherwise.

Implemented in Gcs_mysql_network_provider_native_interface_impl.

◆ restore_original_network_namespace()

virtual bool Gcs_mysql_network_provider_native_interface::restore_original_network_namespace ( )
pure virtual

Restore original network namespace used to be active before a new network namespace has been set.

Returns
false on success, true on failure

Implemented in Gcs_mysql_network_provider_native_interface_impl.

◆ send_command()

virtual bool Gcs_mysql_network_provider_native_interface::send_command ( MYSQL mysql,
enum enum_server_command  command,
const unsigned char *  arg,
size_t  length,
bool  skip_check 
)
pure virtual

Proxy method to simple_command from the MySQL client API.

Parameters
mysqlan active MySQL connection
commandthe command to send
argcommand arguments
lengthlength of the arguments
skip_checkskip checking the command
Returns
true in case of error. false, otherwise

Implemented in Gcs_mysql_network_provider_native_interface_impl.

◆ set_network_namespace()

virtual bool Gcs_mysql_network_provider_native_interface::set_network_namespace ( const std::string &  network_namespace)
pure virtual

Set active network namespace specified by a name.

Parameters
network_namespacethe name of a network namespace to be set active
Returns
false on success, true on error
Note
all opened descriptors used during function run are closed on error

Implemented in Gcs_mysql_network_provider_native_interface_impl.


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