26#ifndef ROUTING_CONTEXT_INCLUDED
27#define ROUTING_CONTEXT_INCLUDED
95 auto pos =
name_.find(
':');
97 if (pos ==
name_.npos)
return {};
99 return name_.substr(pos + 1);
145 const std::string &hostname) {
Type
supported protocols
Definition: base_protocol.h:32
Definition: blocked_endpoints.h:34
uint64_t max_connect_errors() const
Definition: blocked_endpoints.h:39
TlsClientContext per destination.
Definition: destination_ssl_context.h:41
TlsClientContext * get(const std::string &dest_id, const std::string &hostname)
get a TlsClientContent for a destination.
Definition: destination_ssl_context.cc:72
MySQLRoutingContext holds data used by MySQLRouting (1 per plugin instances) and MySQLRoutingConnecti...
Definition: context.h:59
const std::string & get_name() const
Definition: context.h:87
const SharedQuarantineHandler & shared_quarantine() const
Definition: context.h:155
std::string get_id() const
identifier part of the name.
Definition: context.h:94
std::chrono::milliseconds get_client_connect_timeout() const
Definition: context.h:110
std::atomic< uint64_t > info_handled_routes_
Number of handled routes, not used at the moment.
Definition: context.h:192
const mysql_harness::Path & get_bind_named_socket() const
Definition: context.h:119
const BlockedEndpoints & blocked_endpoints() const
Definition: context.h:71
TlsClientContext * dest_ssl_ctx(const std::string &dest_id, const std::string &hostname)
get the SSL context for the server side of the route.
Definition: context.h:144
size_t thread_stack_size_
memory in kilobytes allocated for thread's stack
Definition: context.h:174
uint64_t get_handled_routes()
Definition: context.h:80
void increase_info_handled_routes()
Definition: context.cc:47
SharedQuarantineHandler shared_quarantine_handler_
Callbacks for communicating with quarantined destination candidates instance.
Definition: context.h:184
SharedQuarantineHandler & shared_quarantine()
Definition: context.h:151
bool connection_sharing() const
Definition: context.h:159
unsigned int get_net_buffer_length() const
Definition: context.h:102
uint64_t get_max_connect_errors() const
Definition: context.h:81
std::atomic< uint16_t > info_active_routes_
Number of active routes.
Definition: context.h:190
BlockedEndpoints blocked_endpoints_
Definition: context.h:186
SslMode source_ssl_mode() const noexcept
Definition: context.h:123
std::chrono::milliseconds get_destination_connect_timeout() const
Definition: context.h:106
BlockedEndpoints & blocked_endpoints()
Definition: context.h:70
TlsServerContext * source_ssl_ctx() const
get the SSL context for the client side of the route.
Definition: context.h:133
const mysql_harness::TCPAddress & get_bind_address() const
Definition: context.h:115
DestinationTlsContext * destination_tls_context_
Definition: context.h:178
std::mutex mutex_conn_errors_
Definition: context.h:171
const RoutingConfig routing_config_
Definition: context.h:166
void increase_info_active_routes()
Definition: context.cc:39
BaseProtocol::Type get_protocol()
Definition: context.h:85
TlsServerContext * client_ssl_ctx_
Definition: context.h:176
MySQLRoutingContext(const RoutingConfig &routing_config, std::string name, TlsServerContext *client_ssl_ctx, DestinationTlsContext *dest_tls_context)
Definition: context.h:61
SslMode dest_ssl_mode() const noexcept
Definition: context.h:126
std::chrono::milliseconds connection_sharing_delay() const
Definition: context.h:161
uint16_t get_active_routes()
Definition: context.h:79
void decrease_info_active_routes()
Definition: context.cc:43
const std::string name_
Descriptive name of the connection routing.
Definition: context.h:169
route specific configuration.
Definition: routing_config.h:40
mysql_harness::Path named_socket
unix domain socket path to bind to
Definition: routing_config.h:46
SslMode dest_ssl_mode
SslMode of the server side connection.
Definition: routing_config.h:66
unsigned int client_connect_timeout
client connect timeout in seconds
Definition: routing_config.h:55
SslMode source_ssl_mode
SslMode of the client side connection.
Definition: routing_config.h:59
int connect_timeout
connect-timeout in seconds
Definition: routing_config.h:47
Protocol::Type protocol
protocol (classic, x)
Definition: routing_config.h:42
unsigned int net_buffer_length
Size of buffer to receive packets.
Definition: routing_config.h:56
bool connection_sharing
if connection sharing is allowed.
Definition: routing_config.h:78
mysql_harness::TCPAddress bind_address
IP address to bind to.
Definition: routing_config.h:45
std::chrono::milliseconds connection_sharing_delay
delay before an idling connection is moved to the pool and connection sharing is allowed.
Definition: routing_config.h:80
Definition: shared_quarantine_handler.h:36
Client TLS Context.
Definition: tls_client_context.h:39
TLS Context for the server side.
Definition: tls_server_context.h:46
Class representing a path in a file system.
Definition: filesystem.h:63
Defines an IP address with port number
Definition: tcp_address.h:40
ulong max_connect_errors
Definition: mysqld.cc:1370
static const size_t kDefaultStackSizeInKiloBytes
Definition: mysql_router_thread.h:44
Definition: gcs_xcom_synode.h:64
SslMode
Definition: ssl_mode.h:29
case opt name
Definition: sslopt-case.h:33