package
1.0.0-rc1
Repository: https://github.com/samaritan-proxy/samaritan.git
Documentation: pkg.go.dev

# Functions

NewChecker creates MySQLChecker.
NewHealthCheckPacket creates MySQL packet for health checking with given username.
NewMySQLHeaderFromReader reads a MySQLHeader from reader.

# Constants

Can do 4.1 authentication.
Speaks 4.1 protocol.
Character sets.

# Variables

ComQUIT is a complete MySQL packet of COM_QUIT.

# Structs

Checker does health checking with MySQL protocol.
HandshakeResponse is composed as follows: https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse 4 capability flags, CLIENT_PROTOCOL_41 always set 4 max-packet size 1 character set string[23] reserved (all [0]) string[NUL] username if capabilities & CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA { lenenc-int length of auth-response string[n] auth-response } else if capabilities & CLIENT_SECURE_CONNECTION { 1 length of auth-response string[n] auth-response } else { string[NUL] auth-response } if capabilities & CLIENT_CONNECT_WITH_DB { string[NUL] database } if capabilities & CLIENT_PLUGIN_AUTH { string[NUL] auth plugin name } if capabilities & CLIENT_CONNECT_ATTRS { lenenc-int length of all key-values lenenc-str key lenenc-str value if-more data in 'length of all key-values', more keys and value pairs }.
Header maps the header of a MySQL packet.