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.
TxGate
Fixed reader-permit pool. Read-only autocommit statements take one permit; writers, sync operations, and explicit transactions take the entire pool. Tokio’s fair semaphore queue prevents a waiting writer from being starved by later readers.

Enums§

AuthOutcome
Result of the connect-time authentication decision.

Constants§

DEFAULT_TX_GATE_READER_PERMITS

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.
new_tx_gate_with_permits
Create a transaction gate with an explicit reader capacity.

Type Aliases§

AuthRateLimiter
Tracks per-IP authentication failure counts for rate limiting.