Documentation
¶
Overview ¶
Package postgresql provides a run.Config implementation to create a pgx Pool.
Index ¶
Constants ¶
View Source
const ( DSN = "dsn" ReadOnlyDSN = "dsn-read-only" MaxIdleConnections = "max-idle-connections" MaxOpenConnections = "max-open-connections" MaxConnLifetime = "max-connections-lifetime" MaxConnIdleTime = "max-connections-idletime" )
package flags.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Prefix string
DSN string
DSNRead string
MaxIdleConnections int32
MaxOpenConnections int32
MaxConnLifetime time.Duration
MaxConnIdleTime time.Duration
// contains filtered or unexported fields
}
Config implements run.Config to allow configuration of a db connection pool.
func (*Config) ReadOnlyPool ¶
ReadOnlyPool returns the established read-only database connection pool handler. If no read-only connection pool is established, the default pool will be returned.
Click to show internal directories.
Click to hide internal directories.