26#ifndef ROUTING_SRC_PROCESSORS_SESSION_CLASSIC_GREETING_FORWARDER_H_
27#define ROUTING_SRC_PROCESSORS_SESSION_CLASSIC_GREETING_FORWARDER_H_
106 const std::optional<classic_protocol::message::server::Error> &
err) {
110 std::optional<classic_protocol::message::server::Error>
failed()
const {
137 std::optional<classic_protocol::message::server::Error>
failed_;
163 using ForwardingProcessor::ForwardingProcessor;
193 std::chrono::steady_clock::now()};
243 const std::optional<classic_protocol::message::server::Error> &
err) {
247 std::optional<classic_protocol::message::server::Error>
failed()
const {
275 std::optional<classic_protocol::message::server::Error>
failed_;
protocol state of a classic protocol connection.
Definition: classic_protocol_state.h:40
a processor base class with helper functions.
Definition: forwarding_processor.h:38
Definition: classic_connection_base.h:57
authenticates a server connection.
Definition: classic_greeting_forwarder.h:204
void failed(const std::optional< classic_protocol::message::server::Error > &err)
Definition: classic_greeting_forwarder.h:242
stdx::expected< Result, std::error_code > tls_forward()
Definition: classic_greeting_forwarder.cc:1784
size_t server_last_recv_buf_size_
Definition: classic_greeting_forwarder.h:272
size_t server_last_send_buf_size_
Definition: classic_greeting_forwarder.h:273
std::optional< std::string_view > diagnostic_stage_name() const override
stage name of a staged processor.
Definition: classic_greeting_forwarder.cc:2300
RouterRequireFetcher::Result required_connection_attributes_fetcher_result_
Definition: classic_greeting_forwarder.h:277
stdx::expected< Result, std::error_code > auth_ok()
server-side: auth is ok.
Definition: classic_greeting_forwarder.cc:2139
stdx::expected< Result, std::error_code > client_greeting()
Definition: classic_greeting_forwarder.cc:1492
size_t client_last_send_buf_size_
Definition: classic_greeting_forwarder.h:271
stdx::expected< Result, std::error_code > fetch_user_attrs()
Definition: classic_greeting_forwarder.cc:2187
std::optional< classic_protocol::message::server::Error > failed() const
Definition: classic_greeting_forwarder.h:247
stdx::expected< Result, std::error_code > tls_connect_init()
Definition: classic_greeting_forwarder.cc:1851
stdx::expected< Result, std::error_code > fetch_user_attrs_done()
Definition: classic_greeting_forwarder.cc:2200
Stage stage_
Definition: classic_greeting_forwarder.h:279
void client_greeting_server_adjust_caps(ClassicProtocolState &rc_protocol, ClassicProtocolState &st_protocol)
Definition: classic_greeting_forwarder.cc:1442
stdx::expected< Result, std::error_code > client_greeting_full()
Definition: classic_greeting_forwarder.cc:1653
stdx::expected< Result, std::error_code > process() override
Definition: classic_greeting_forwarder.cc:1397
stdx::expected< Result, std::error_code > tls_forward_init()
Definition: classic_greeting_forwarder.cc:1830
std::optional< classic_protocol::message::server::Error > failed_
Definition: classic_greeting_forwarder.h:275
stdx::expected< Result, std::error_code > tls_connect()
Definition: classic_greeting_forwarder.cc:1885
Stage stage() const
Definition: classic_greeting_forwarder.h:238
ServerFirstAuthenticator(MysqlRoutingClassicConnectionBase *conn, std::function< void(const classic_protocol::message::server::Error &)> on_error)
Definition: classic_greeting_forwarder.h:206
stdx::expected< Result, std::error_code > client_greeting_start_tls()
Definition: classic_greeting_forwarder.cc:1575
Stage
stages of the handshake flow.
Definition: classic_greeting_forwarder.h:215
stdx::expected< Result, std::error_code > auth_error()
router<-server: auth error.
Definition: classic_greeting_forwarder.cc:2109
stdx::expected< Result, std::error_code > initial_response()
Definition: classic_greeting_forwarder.cc:2047
size_t client_last_recv_buf_size_
Definition: classic_greeting_forwarder.h:270
stdx::expected< Result, std::error_code > final_response()
Definition: classic_greeting_forwarder.cc:2063
stdx::expected< Result, std::error_code > client_greeting_after_tls()
Definition: classic_greeting_forwarder.cc:1977
void stage(Stage stage)
Definition: classic_greeting_forwarder.h:237
std::function< void(const classic_protocol::message::server::Error &err)> on_error_
Definition: classic_greeting_forwarder.h:282
classic protocol handshake between router<->server and client<->router.
Definition: classic_greeting_forwarder.h:161
stdx::expected< Result, std::error_code > server_greeted()
received an server::greeting or server::error from the server.
Definition: classic_greeting_forwarder.cc:1353
stdx::expected< Result, std::error_code > process() override
Definition: classic_greeting_forwarder.cc:1284
Stage stage() const
Definition: classic_greeting_forwarder.h:180
stdx::expected< Result, std::error_code > server_greeting()
Definition: classic_greeting_forwarder.cc:1312
Stage stage_
Definition: classic_greeting_forwarder.h:189
stdx::expected< Result, std::error_code > connect()
Definition: classic_greeting_forwarder.cc:1305
std::chrono::steady_clock::time_point started_
Definition: classic_greeting_forwarder.h:192
std::optional< std::string_view > diagnostic_stage_name() const override
stage name of a staged processor.
Definition: classic_greeting_forwarder.cc:2280
void stage(Stage stage)
Definition: classic_greeting_forwarder.h:179
Stage
stages of the handshake flow.
Definition: classic_greeting_forwarder.h:168
classic protocol handshake between client<->router and router<->server.
Definition: classic_greeting_forwarder.h:36
stdx::expected< Result, std::error_code > error()
Definition: classic_greeting_forwarder.cc:352
ServerGreetor(MysqlRoutingClassicConnectionBase *conn, bool in_handshake, std::function< void(const classic_protocol::message::server::Error &)> on_error, TraceEvent *parent_event)
construct a server::greeting processor.
Definition: classic_greeting_forwarder.h:62
void stage(Stage stage)
Definition: classic_greeting_forwarder.h:100
void failed(const std::optional< classic_protocol::message::server::Error > &err)
Definition: classic_greeting_forwarder.h:105
stdx::expected< Result, std::error_code > client_greeting_start_tls()
Definition: classic_greeting_forwarder.cc:733
stdx::expected< Result, std::error_code > client_greeting_after_tls()
a TLS client greeting.
Definition: classic_greeting_forwarder.cc:1044
bool in_handshake_
Definition: classic_greeting_forwarder.h:133
stdx::expected< Result, std::error_code > process() override
Definition: classic_greeting_forwarder.cc:308
stdx::expected< Result, std::error_code > tls_connect_init()
Definition: classic_greeting_forwarder.cc:897
TraceEvent * trace_event_server_greeting_
Definition: classic_greeting_forwarder.h:144
TraceEvent * trace_event_greeting_
Definition: classic_greeting_forwarder.h:143
stdx::expected< Result, std::error_code > client_greeting_full()
send a non-TLS client greeting to the server.
Definition: classic_greeting_forwarder.cc:796
std::optional< classic_protocol::message::server::Error > failed() const
Definition: classic_greeting_forwarder.h:110
stdx::expected< Result, std::error_code > server_greeting_error()
received an server::error from the server.
Definition: classic_greeting_forwarder.cc:411
std::function< void(const classic_protocol::message::server::Error &err)> on_error_
Definition: classic_greeting_forwarder.h:140
std::optional< std::string_view > diagnostic_stage_name() const override
stage name of a staged processor.
Definition: classic_greeting_forwarder.cc:2240
Stage stage() const
Definition: classic_greeting_forwarder.h:101
stdx::expected< Result, std::error_code > server_greeting_greeting()
received a server::greeting from the server.
Definition: classic_greeting_forwarder.cc:503
stdx::expected< Result, std::error_code > client_greeting()
Definition: classic_greeting_forwarder.cc:626
stdx::expected< Result, std::error_code > initial_response()
Definition: classic_greeting_forwarder.cc:1132
TraceEvent * parent_event_
Definition: classic_greeting_forwarder.h:142
TraceEvent * trace_event_client_greeting_
Definition: classic_greeting_forwarder.h:145
stdx::expected< Result, std::error_code > tls_connect()
Definition: classic_greeting_forwarder.cc:935
Stage
stages of the handshake flow.
Definition: classic_greeting_forwarder.h:78
Stage stage_
Definition: classic_greeting_forwarder.h:135
std::optional< classic_protocol::message::server::Error > failed_
Definition: classic_greeting_forwarder.h:137
TraceEvent * trace_event_tls_connect_
Definition: classic_greeting_forwarder.h:146
stdx::expected< Result, std::error_code > auth_ok()
server-side: auth is ok.
Definition: classic_greeting_forwarder.cc:1232
stdx::expected< Result, std::error_code > server_greeting()
Definition: classic_greeting_forwarder.cc:379
stdx::expected< Result, std::error_code > auth_error()
router<-server: auth error.
Definition: classic_greeting_forwarder.cc:1196
stdx::expected< Result, std::error_code > final_response()
Definition: classic_greeting_forwarder.cc:1151
void client_greeting_server_adjust_caps(ClassicProtocolState &src_protocol, ClassicProtocolState &dst_protocol)
Definition: classic_greeting_forwarder.cc:449
Definition: expected.h:286
borrowable::message::server::Error< false > Error
Definition: classic_protocol_message.h:1411
static Value err()
Create a Value object that represents an error condition.
Definition: json_binary.cc:943
Define std::hash<Gtid>.
Definition: gtid.h:355
Definition: trace_span.h:35