pg_connector

package
v0.0.0-...-a051c0a Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 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 Config

type Config struct {
	User            string        `yaml:"user"`
	Port            string        `yaml:"port"`
	DBName          string        `yaml:"dbname"`
	Password        string        `yaml:"password"`
	Host            string        `yaml:"host"`
	Driver          string        `yaml:"driver"`
	SSLMode         string        `yaml:"sslMode"`
	MaxOpenConns    int           `yaml:"max_open_conns"`
	ConnMaxLifetime time.Duration `yaml:"conn_max_lifetime"`
	MaxIdleConns    int           `yaml:"max_idle_conns"`
	ConnMaxIdleTime time.Duration `yaml:"conn_max_idle_time"`
}

type Connector

type Connector struct {
	*sqlx.DB
	// contains filtered or unexported fields
}

func New

func New(cfg Config) *Connector

func (*Connector) Start

func (c *Connector) Start(_ context.Context) error

func (*Connector) Stop

func (c *Connector) Stop(_ context.Context) error

Jump to

Keyboard shortcuts

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