Skip to main content

Module frontend

Module frontend 

Source
Expand description

Per-client wire-protocol entry point. Drives the PostgreSQL startup handshake (SSL/GSS negotiation, StartupMessage parsing, cancel forwarding), authenticates, checks out an initial server connection, sets up multiplexed LISTEN when configured, and dispatches to crate::proxy::session::forward or crate::proxy::transaction::forward based on the pool mode.

Functionsยง

forward
Accept a client connection, run the PostgreSQL startup handshake, authenticate, and forward traffic until the client disconnects. Wraps the whole session in the root proxy.client span so every nested span (setup, auth, checkout, transaction, statement) appears under a single trace from accept through cleanup.