Documentation
¶
Overview ¶
Package postgresql provides a run.Config implementation to create a pgx Pool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
DSN string `run:"secret,usage=data source name"`
DSNReadOnly string `run:"secret,usage=read-only data source name"`
MaxIdleConnections int32 `run:"usage=max. idle connections"`
MaxOpenConnections int32 `run:"usage=max. open connections"`
MaxConnectionsLifetime time.Duration `run:"usage=max. connection lifetime"`
MaxConnectionsIdleTime time.Duration `run:"usage=max. connection idle time"`
Prefix string `run:"-"`
// 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.
func (*Config) Validate ¶
func (c *Config) Validate(cem run.ConfigErrorManager)
Validate implements run.Config.
Click to show internal directories.
Click to hide internal directories.