Versions in this module Expand all Collapse all v0 v0.0.22 May 21, 2026 Changes in this version + const DefaultPoolStatsInterval + const DefaultSSLMode + func NewAuthToken(ctx context.Context, cfg *Config, user string) (string, error) + func NewPool(ctx context.Context, cfg *Config, opts ...Option) (*pgxpool.Pool, error) + func StartPoolStatsLogger(ctx context.Context, pool *pgxpool.Pool, logger *slog.Logger, ...) + type BeforeConnectFn func(ctx context.Context, conn *pgx.ConnConfig) error + func NewDynamicAuthFunc(ctx context.Context, cfg *Config, user string) (BeforeConnectFn, error) + type Config struct + ConnMaxLifetime time.Duration + Database string + DynamicAuth *DynamicAuthConfig + Host string + MaxOpenConns int32 + MigrationPassword string + MigrationUser string + MinConns int32 + Password string + Port int + SSLMode string + User string + func (c *Config) BuildConnectionStringWithAuth(user, password string) string + func (c *Config) ConnectionString() string + func (c *Config) GetMigrationPassword() string + func (c *Config) GetMigrationUser() string + func (c *Config) LogValue() slog.Value + func (c *Config) MigrationConnectionString() string + func (c *Config) Validate() error + type DynamicAuthAWSRDSIAM struct + Region string + type DynamicAuthConfig struct + AWSRDSIAM *DynamicAuthAWSRDSIAM + type Option func(*options) + func WithAfterConnect(fn func(ctx context.Context, conn *pgx.Conn) error) Option + func WithBeforeConnect(fn BeforeConnectFn) Option + func WithLogger(logger *slog.Logger) Option