embeddedTransportFor function

Transport embeddedTransportFor(
  1. PostgresDatabaseConfig config
)

How the embedded postmaster for config listens.

Always the Unix socket, plus loopback TCP on config's port when a password is configured. Every process derives the same answer, so start order does not matter.

Implementation

Transport embeddedTransportFor(PostgresDatabaseConfig config) =>
    config.password.isEmpty
    ? const UnixTransport()
    : DualTransport(port: config.port, password: config.password);