Versions in this module Expand all Collapse all v0 v0.2.0 Mar 8, 2026 v0.1.0 Jan 18, 2026 Changes in this version + type BeforeConnectHook func(ctx context.Context, cfg *pgxpool.Config) error + type CloseHook func() error + type Connector struct + func NewConnector(opts ...ConnectorOption) *Connector + func (c *Connector) Close() error + func (c *Connector) Config() (*pgxpool.Config, error) + func (c *Connector) Connect(ctx context.Context, cfg *pgxpool.Config) (*pgxpool.Pool, error) + func (c *Connector) ConnectToServicePool(ctx context.Context, env *Environment, cfg *pgxpool.Config) (*pgxpool.Pool, error) + type ConnectorOption func(*Connector) + func WithBeforeConnectHook(hook BeforeConnectHook) ConnectorOption + func WithCloseHook(hook CloseHook) ConnectorOption + func WithDatabase(databaseName string) ConnectorOption + func WithHost(host string) ConnectorOption + func WithPassword(password string) ConnectorOption + func WithPort(port uint16) ConnectorOption + func WithSchema(schema string) ConnectorOption + func WithTLSConfig(tlsConfig *tls.Config) ConnectorOption + func WithUser(user string) ConnectorOption + type Environment struct + func New(opts ...EnvironmentOption) *Environment + func (e *Environment) Connect(ctx context.Context) (*Pool, error) + type EnvironmentOption func(*Environment) + func WithConnectorReuseOptions(createFunc func() (*Connector, error), opts ...reuse.Option[*Connector]) EnvironmentOption + func WithMaxConnsPerConnect(maxConnPerConnect int32) EnvironmentOption + func WithReuseStrategy(strategy ReuseStrategy) EnvironmentOption + type Pool struct + Pool *pgxpool.Pool + func (p *Pool) Close() + type ReuseStrategy interface + type ReuseStrategyCreateNewDB struct + NewDBName func() string + type ReuseStrategyCreateNewSchema struct + DB string + NewSchemaName func() string + type StdlibEnvironment struct + func NewStdlib(env *Environment, opts ...stdlib.OptionOpenDB) *StdlibEnvironment + func (d *StdlibEnvironment) Connect(ctx context.Context) (*sql.DB, error)