MySQL 9.1.0
Source Code Documentation
dest_metadata_cache.cc File Reference
#include "dest_metadata_cache.h"
#include <algorithm>
#include <cctype>
#include <chrono>
#include <iterator>
#include <memory>
#include <mutex>
#include <set>
#include <stdexcept>
#include <string>
#include <string_view>
#include <system_error>
#include "mysql/harness/logging/logging.h"
#include "mysql/harness/plugin.h"
#include "mysqlrouter/destination.h"
#include "mysqlrouter/routing.h"
#include "tcp_address.h"

Classes

class  MetadataCacheDestination
 

Namespaces

 

Functions

DestMetadataCacheGroup::ServerRole get_server_role_from_uri (const mysqlrouter::URIQuery &uri)
 
routing::RoutingStrategy get_default_routing_strategy (const DestMetadataCacheGroup::ServerRole role)
 
bool get_yes_no_option (const mysqlrouter::URIQuery &uri, const std::string &option_name, const bool defalut_res, const std::function< void()> &check_option_allowed)
 
bool get_disconnect_on_promoted_to_primary (const mysqlrouter::URIQuery &uri, const DestMetadataCacheGroup::ServerRole &role)
 
bool get_disconnect_on_metadata_unavailable (const mysqlrouter::URIQuery &uri)
 

Variables

static const auto kPrimaryFailoverTimeout = 10s
 
static constexpr std::array supported_params
 
constexpr const auto anonymous_namespace{dest_metadata_cache.cc}::known_roles
 

Function Documentation

◆ get_default_routing_strategy()

routing::RoutingStrategy get_default_routing_strategy ( const DestMetadataCacheGroup::ServerRole  role)

◆ get_disconnect_on_metadata_unavailable()

bool get_disconnect_on_metadata_unavailable ( const mysqlrouter::URIQuery uri)

◆ get_disconnect_on_promoted_to_primary()

bool get_disconnect_on_promoted_to_primary ( const mysqlrouter::URIQuery uri,
const DestMetadataCacheGroup::ServerRole role 
)

◆ get_server_role_from_uri()

DestMetadataCacheGroup::ServerRole get_server_role_from_uri ( const mysqlrouter::URIQuery uri)

◆ get_yes_no_option()

bool get_yes_no_option ( const mysqlrouter::URIQuery uri,
const std::string &  option_name,
const bool  defalut_res,
const std::function< void()> &  check_option_allowed 
)

Variable Documentation

◆ kPrimaryFailoverTimeout

const auto kPrimaryFailoverTimeout = 10s
static

◆ supported_params

constexpr std::array supported_params
staticconstexpr
Initial value:
{
"role", "allow_primary_reads", "disconnect_on_promoted_to_primary",
"disconnect_on_metadata_unavailable"}