postgres

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPooledDB

func NewPooledDB(config DBConfig) (*sql.DB, error)

NewPooledDB allocates a sql.DB instance.

It uses a custom pooling mechanism provided by the package `jackc/pgx` specially tuned for Postgres.

Types

type DBConfig

type DBConfig struct {
	gecksql.DBConfig
	MaxConnLifetimeJitter time.Duration `env:"PSQL_MAX_CONN_LIFETIME_JITTER"`
	HealthCheckInterval   time.Duration `env:"PSQL_HEALTHCHECK_INTERVAL" envDefault:"5s"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL