MySQL 9.1.0
Source Code Documentation
mysql_harness::SectionConfigExposer Class Referenceabstract

Base class for a plugin specific specializations. More...

#include <section_config_exposer.h>

Inheritance diagram for mysql_harness::SectionConfigExposer:
[legend]

Public Types

enum class  Mode { ExposeInitialConfig , ExposeDefaultConfig }
 
using DC = mysql_harness::DynamicConfig
 
using OptionValue = DC::OptionValue
 

Public Member Functions

 SectionConfigExposer (bool initial, const mysql_harness::ConfigSection &default_section, const DC::SectionId &section_id)
 Constructor. More...
 
virtual ~SectionConfigExposer ()=default
 
 SectionConfigExposer (const SectionConfigExposer &)=delete
 

Protected Member Functions

virtual void expose ()=0
 Exposes plugin instance configuration. More...
 
void expose_option (std::string_view option, const OptionValue &value, const OptionValue &default_value, bool is_common=false)
 Exposes single option configuration. More...
 
void expose_option (std::string_view option, const OptionValue &value, const OptionValue &default_value_cluster, const OptionValue &default_value_clusterset, bool is_common)
 Exposes single option configuration (overload for options that have different defaults for Cluster and for ClusterSet configuration). More...
 

Protected Attributes

const Mode mode_
 
const mysql_harness::ConfigSectiondefault_section_
 
const DC::SectionId section_id_
 
const DC::SectionId common_section_id_ {"common", ""}
 

Private Member Functions

void expose_str_option (std::string_view option, const OptionValue &value, const OptionValue &default_value_cluster, const OptionValue &default_value_clusterset, bool is_common=false)
 
void expose_int_option (std::string_view option, const OptionValue &value, const OptionValue &default_value_cluster, const OptionValue &default_value_clusterset, bool is_common=false)
 
void expose_double_option (std::string_view option, const OptionValue &value, const OptionValue &default_value_cluster, const OptionValue &default_value_clusterset, bool is_common=false)
 
void expose_bool_option (std::string_view option, const OptionValue &value, const OptionValue &default_value_cluster, const OptionValue &default_value_clusterset, bool is_common=false)
 
void expose_default (std::string_view option, const auto &default_value_cluster, const auto &default_value_clusterset, bool is_common)
 

Detailed Description

Base class for a plugin specific specializations.

Lets the plugin expose their initial and default configuration to the DynamicConfig object.

Member Typedef Documentation

◆ DC

◆ OptionValue

Member Enumeration Documentation

◆ Mode

Enumerator
ExposeInitialConfig 
ExposeDefaultConfig 

Constructor & Destructor Documentation

◆ SectionConfigExposer() [1/2]

mysql_harness::SectionConfigExposer::SectionConfigExposer ( bool  initial,
const mysql_harness::ConfigSection default_section,
const DC::SectionId section_id 
)
inline

Constructor.

Parameters
initialflag indicating if the initial or default configuration is being shared.
default_sectiondefault section of the current configuration
section_ididentifier of the plugin configuration in the Dynamic config object.

◆ ~SectionConfigExposer()

virtual mysql_harness::SectionConfigExposer::~SectionConfigExposer ( )
virtualdefault

◆ SectionConfigExposer() [2/2]

mysql_harness::SectionConfigExposer::SectionConfigExposer ( const SectionConfigExposer )
delete

Member Function Documentation

◆ expose()

◆ expose_bool_option()

void mysql_harness::SectionConfigExposer::expose_bool_option ( std::string_view  option,
const OptionValue value,
const OptionValue default_value_cluster,
const OptionValue default_value_clusterset,
bool  is_common = false 
)
private

◆ expose_default()

void mysql_harness::SectionConfigExposer::expose_default ( std::string_view  option,
const auto &  default_value_cluster,
const auto &  default_value_clusterset,
bool  is_common 
)
inlineprivate

◆ expose_double_option()

void mysql_harness::SectionConfigExposer::expose_double_option ( std::string_view  option,
const OptionValue value,
const OptionValue default_value_cluster,
const OptionValue default_value_clusterset,
bool  is_common = false 
)
private

◆ expose_int_option()

void mysql_harness::SectionConfigExposer::expose_int_option ( std::string_view  option,
const OptionValue value,
const OptionValue default_value_cluster,
const OptionValue default_value_clusterset,
bool  is_common = false 
)
private

◆ expose_option() [1/2]

void mysql_harness::SectionConfigExposer::expose_option ( std::string_view  option,
const OptionValue value,
const OptionValue default_value,
bool  is_common = false 
)
protected

Exposes single option configuration.

Parameters
optionoption name
valueconfigured (initial) value of the option
default_valuedefault value for both Cluster and ClusterSet configuration
is_commonindicates whether the options is supposed to also be shared in the "common" section of the configuration

◆ expose_option() [2/2]

void mysql_harness::SectionConfigExposer::expose_option ( std::string_view  option,
const OptionValue value,
const OptionValue default_value_cluster,
const OptionValue default_value_clusterset,
bool  is_common 
)
protected

Exposes single option configuration (overload for options that have different defaults for Cluster and for ClusterSet configuration).

Parameters
optionoption name
valueconfigured (initial) value of the option
default_value_clusterdefault value for Cluster configuration
default_value_clustersetdefault value for ClusterSet configuration
is_commonindicates whether the options is supposed to also be shared in the "common" section of the configuration

◆ expose_str_option()

void mysql_harness::SectionConfigExposer::expose_str_option ( std::string_view  option,
const OptionValue value,
const OptionValue default_value_cluster,
const OptionValue default_value_clusterset,
bool  is_common = false 
)
private

Member Data Documentation

◆ common_section_id_

const DC::SectionId mysql_harness::SectionConfigExposer::common_section_id_ {"common", ""}
protected

◆ default_section_

const mysql_harness::ConfigSection& mysql_harness::SectionConfigExposer::default_section_
protected

◆ mode_

const Mode mysql_harness::SectionConfigExposer::mode_
protected

◆ section_id_

const DC::SectionId mysql_harness::SectionConfigExposer::section_id_
protected

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