package
Version:
v2.275.0
Opens a new window with list of versions in this module.
Published: Feb 11, 2026
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package pg provides SQL database wiring and helpers for go-service.
Module provides the Fx module that wires PostgreSQL SQL database support.
Open opens PostgreSQL master/slave connection pools.
If cfg is disabled, it returns (nil, nil).
Register registers the pgx `database/sql` driver under the name "pg" and enables
OpenTelemetry driver instrumentation.
type Config struct {
*config.Config `yaml:",inline" json:",inline" toml:",inline"`
}
Config contains PostgreSQL SQL database configuration.
It embeds `database/sql/config`.Config to reuse common pool settings and DSN
configuration.
IsEnabled reports whether PostgreSQL configuration is present and enabled.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.