pgwire::pg_server

Function pg_serve

source
pub async fn pg_serve(
    addr: &str,
    tcp_keepalive: TcpKeepalive,
    session_mgr: Arc<impl SessionManager>,
    tls_config: Option<TlsConfig>,
    redact_sql_option_keywords: Option<RedactSqlOptionKeywordsRef>,
    shutdown: CancellationToken,
) -> Result<(), BoxedError>
Expand description

Binds a Tcp or Unix listener at addr. Spawn a coroutine to serve every new connection.

Returns when the shutdown token is triggered.