postgres

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configs

type Configs struct {
	Host     string
	Port     string
	Username string
	Password string
	Database string
	SSLMode  string

	MaxOpenedConnections int

	ApplicationName string

	ConnectionMaxIdleTime time.Duration
	ConnectionMaxLifeTime time.Duration
	HealthCheckPeriod     time.Duration
	ConnectTimeout        time.Duration
	MaxConnLifeTimeJitter time.Duration
}

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

func NewPostgresConnection

func NewPostgresConnection(ctx context.Context, config Configs) *Connection

func (*Connection) GetPool

func (r *Connection) GetPool() *pgxpool.Pool

func (*Connection) Stop

func (r *Connection) Stop()

Jump to

Keyboard shortcuts

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