Skip to content

Infrastructure adapters ​

pkg/infrastructure contains separate PostgreSQL and Redis packages. They are legacy connection helpers, not the current API startup's authoritative dependency wiring.

The PostgreSQL helper constructs a database/sql connection pool and requires a registered postgres SQL driver. Its connectivity ping is currently ignored, so a returned handle does not prove readiness. The API server instead uses pgxpool, explicitly pings PostgreSQL, and fails startup on errors.

The Redis helper performs a best-effort TCP probe and returns an address/DB wrapper even when probing fails. It is not a complete Redis driver or proof of authentication/connectivity. Redis settings are present in configuration and Compose but not used by current API startup.

Use the consuming application's required dependency checks rather than inferring them from adapter names or comments. See PostgreSQL reference and Redis reference.

Documentation follows the source. Planned contracts are marked explicitly.