Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
Connect opens a Postgres connection pool using cfg and retries Ping with exponential backoff until the connection succeeds or defaultMaxTimeout elapses.
func ResolveURL ¶
ResolveURL returns url, unless urlFile is non-empty in which case the URL is read from that file. Used by callers (e.g. the migration runner) that need the resolved connection string before a pool is created.
Types ¶
type PostgresConfig ¶
PostgresConfig holds the connection parameters for a Postgres database. URL must be a resolved connection string — use ResolveURL to resolve from a file path before constructing this config.
Click to show internal directories.
Click to hide internal directories.