Skip to main content

Module handler

Module handler 

Source

Structs§

ConnOpts
Options for a single connection, bundled to keep handle_connection’s argument list short.
Principal
An authenticated connection’s identity. Bound at connect time and consulted on every query by dispatch_query to enforce the user’s role: a readonly principal may only execute read statements.

Enums§

AuthOutcome
Result of the connect-time authentication decision.

Functions§

authenticate_connect
Pure, exhaustively-testable authentication decision for a CONNECT handshake.
handle_connection
new_rate_limiter
Create a new shared rate limiter.
new_tx_gate
Create a transaction gate for a shared engine.

Type Aliases§

AuthRateLimiter
Tracks per-IP authentication failure counts for rate limiting.
TxGate
Gate that serializes wire-protocol statements while an explicit transaction is open on any connection. The connection that runs begin keeps an owned permit until commit, rollback, disconnect, or timeout, preventing other connections from observing or joining uncommitted state.