Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PGOpenContext ¶
Types ¶
type PGOpenOption ¶
type PGOpenOption func(*dbOpts)
func WithMaxConnectionLifetime ¶
func WithMaxConnectionLifetime(d time.Duration) PGOpenOption
WithMaxConnectionLifetime configures the maximum connection lifetime. The current default value is set based on the known pg-gateway and a2-backend timeouts. Consider carefully before changing. A zero duration disables the connection lifetime.
func WithMaxConnectionLifetimeJitter ¶
func WithMaxConnectionLifetimeJitter(d time.Duration) PGOpenOption
WithMaxConnectionLifetimeJitter adds a random duration in the range of [0, d) to the configured MaxConnectionLifetime if it is non-zero.
func WithPingInterval ¶
func WithPingInterval(d time.Duration) PGOpenOption
WithPingInterval configures a background goroutine that will ping the database every interval. A zero duration disables the pinger. Default: 20s
func WithPingJitter ¶
func WithPingJitter(d time.Duration) PGOpenOption
WithPingJitter adds a random duration in the range of [o, d) to the PeriodicPingInterval. Default: 20s
Click to show internal directories.
Click to hide internal directories.