pool

package
v0.0.0-...-11e1ac5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPool

func NewPool(cfg Config) (*pgxpool.Pool, error)

Creating a new pool connections to postgres database.

Types

type Config

type Config struct {
	// Postgres database connection url.
	URL string
	// Maximum pool connections to postgres database.
	MaxConns int32
	// Minimum pool connections to postgres database.
	MinConns int32
	// Database logger.
	Logger pgx.Logger
	// Added a new custom types.
	Types []types.DataType
}

Postgres pool connection config.

func (*Config) Init

func (c *Config) Init(cfg *pgxpool.Config) error

Init pool config.

Jump to

Keyboard shortcuts

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