Versions in this module Expand all Collapse all v0 v0.0.10 Apr 10, 2026 v0.0.9 Mar 17, 2026 Changes in this version + func StartMetricsServer(addr string, handler http.Handler) error + type DBProtocol string + const ProtocolMySQL + const ProtocolPostgreSQL + const ProtocolUnknown + type HandshakeInfo struct + Database string + Options map[string]string + Protocol DBProtocol + Username string + func DetectProtocolAndParse(conn net.Conn) (*HandshakeInfo, error) + type HandshakeParser interface + Parse func(conn net.Conn) (*HandshakeInfo, error) + Protocol func() DBProtocol + type MetricsSnapshot struct + ActiveConnections int64 + BlockedQueries int64 + FailedConnections int64 + TotalBytesReceived int64 + TotalBytesSent int64 + TotalConnections int64 + TotalQueriesExecuted int64 + Uptime string + func GetMetricsSnapshot(metrics *proxy.TCPServerMetrics, rdsMetrics *RdsMetrics) MetricsSnapshot + type MySQLConnectionPool struct + func NewMySQLConnectionPool(maxSize int, idleTimeout time.Duration, log *zerolog.Logger) *MySQLConnectionPool + func (p *MySQLConnectionPool) Close() + func (p *MySQLConnectionPool) GetConnection(ctx context.Context, target string) (net.Conn, error) + func (p *MySQLConnectionPool) GetStats() map[string]PoolStats + func (p *MySQLConnectionPool) ReleaseConnection(conn net.Conn) + type MySQLHandshakeParser struct + func (p *MySQLHandshakeParser) Parse(conn net.Conn) (*HandshakeInfo, error) + func (p *MySQLHandshakeParser) Protocol() DBProtocol + type MySQLInterceptor struct + type PoolStats struct + ActiveCount int + IdleCount int + Target string + type PostgreSQLHandshakeParser struct + func (p *PostgreSQLHandshakeParser) Parse(conn net.Conn) (*HandshakeInfo, error) + func (p *PostgreSQLHandshakeParser) Protocol() DBProtocol + type PrometheusMetrics struct + func NewPrometheusMetrics(namespace string) *PrometheusMetrics + func (m *PrometheusMetrics) Handler() http.Handler + func (m *PrometheusMetrics) RecordQueryDuration(seconds float64) + func (m *PrometheusMetrics) UpdateFromServerMetrics(metrics *proxy.TCPServerMetrics) + func (m *PrometheusMetrics) UpdatePoolStats(stats map[string]PoolStats) + type RdsConnectionHandler struct + func NewRdsConnectionHandler(maxConnections int, policySvc policy.Service, backendSvc backend.Service, ...) *RdsConnectionHandler + func (h *RdsConnectionHandler) Close() + func (h *RdsConnectionHandler) GetMetrics() *RdsMetrics + func (h *RdsConnectionHandler) GetPoolStats() map[string]interface{} + func (h *RdsConnectionHandler) HandleConnection(ctx context.Context, clientConn net.Conn) error + type RdsMetrics struct + BlockedQueries int64 + TotalQueriesExecuted int64 + type RdsProxyServiceImpl struct + ConnectTimeout int + IdleTimeout int + MetricsAddr string + MetricsEnabled bool + TCPEnabled bool + TCPListenAddr string + TCPMaxConns int + WebSocketEnabled bool + func (m *RdsProxyServiceImpl) CloseSession(sessionID string) error + func (m *RdsProxyServiceImpl) GetActiveSessions() []rds.SessionInfo + func (m *RdsProxyServiceImpl) GetMetrics() *rds.ServerMetrics + func (m *RdsProxyServiceImpl) GetPoolStats() rds.PoolStats + func (m *RdsProxyServiceImpl) GetTCPServer() *rds.TCPServerInfo + func (m *RdsProxyServiceImpl) HandleWebSocketProxy(ctx context.Context, conn *proxy.Connection, wsConn proxy.WebSocketConn) error + func (m *RdsProxyServiceImpl) Init() error + func (m *RdsProxyServiceImpl) Name() string