postgres

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pool

func Pool(ctx context.Context, config Config) (*pgxpool.Pool, error)

Types

type Config

type Config struct {
	DSN                   string                      `json:"dsn"`
	Health                *jt.JSONType[time.Duration] `json:"health"`
	InitialTimeout        *jt.JSONType[time.Duration] `json:"initialTimeout"`
	MaxIdle               *jt.JSONType[time.Duration] `json:"maxIdle"`
	MaxConnLifetime       *jt.JSONType[time.Duration] `json:"maxConnLifetime"`
	MaxConnLifetimeJitter *jt.JSONType[time.Duration] `json:"maxConnLifetimeJitter"`
	MinConns              int32                       `json:"minConns"`
}

func (Config) DefaultsAndValidate

func (c Config) DefaultsAndValidate() (Config, error)

Jump to

Keyboard shortcuts

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