MySQL 8.0.31
Source Code Documentation
minimal_chassis.h File Reference

Go to the source code of this file.

Functions

bool minimal_chassis_init (mysql_service_registry_t **registry, mysql_component_t *comp_ref)
 This is the entry function for minimal_chassis static library, which has to be called by the application code. More...
 
bool minimal_chassis_deinit (mysql_service_registry_t *registry, mysql_component_t *comp_ref)
 This is the exit function for minimal_chassis static library, which has to be called just before the exit of the application. More...
 
void minimal_chassis_services_refresh (bool use_related)
 This function refreshes the global service handles based on the use_related flag. More...
 
void mysql_components_handle_std_exception (const char *funcname)
 Checks if last thrown exception is any kind of standard exceptions, i.e. More...
 

Function Documentation

◆ minimal_chassis_deinit()

bool minimal_chassis_deinit ( mysql_service_registry_t registry,
mysql_component_t comp_ref 
)

This is the exit function for minimal_chassis static library, which has to be called just before the exit of the application.

Releases the service registry and dynamic loader services. Releases the registry handle, which is acquired at the time of minimal_chassis_init(), if provided the handle address. And un-registers the component services, if provided component reference which is statically linked to this library.

Parameters
[in]registryA service handle to registry service.
[in]comp_refA component structure referance name.
Returns
Status of performed operation
Return values
falsesuccess
truefailure

◆ minimal_chassis_init()

bool minimal_chassis_init ( mysql_service_registry_t **  registry,
mysql_component_t comp_ref 
)

This is the entry function for minimal_chassis static library, which has to be called by the application code.

Bootstraps service registry and dynamic loader. And registry handle will be assigned, if provided empty handle address. And loads provided component services into the registry, if provided component reference which is statically linked to this library.

Parameters
[out]registryA service handle to registry service.
[in]comp_refA component structure referance name.
Returns
Status of performed operation
Return values
falsesuccess
truefailure

◆ minimal_chassis_services_refresh()

void minimal_chassis_services_refresh ( bool  use_related)

This function refreshes the global service handles based on the use_related flag.

The global services are mysql_runtime_error, mysql_psi_system_v1 and mysql_rwlock_v1. If the use_related is ON then the globals are loaded with minimal chassis service implementations else they are loaded with the default service implementations

Parameters
use_relatedUsed to decide which service implementation to load for globals.

◆ mysql_components_handle_std_exception()

void mysql_components_handle_std_exception ( const char *  funcname)

Checks if last thrown exception is any kind of standard exceptions, i.e.

the exceptions inheriting from std::exception. If so, reports an error message that states exception type and message. On any other thrown value it just reports general error.

Parameters
funcnameName of the function where the error occurs.