postgres

package
v0.0.0-...-a5319db Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, log *zap.Logger, c *Config) (*gorm.DB, string)

Types

type Config

type Config struct {
	Addresses          []string `` /* 135-byte string literal not displayed */
	ConnMaxLifetimeMs  int      `` /* 199-byte string literal not displayed */
	MaxOpenConns       int      `yaml:"max_open_conns" json:"max_open_conns" usage:"Maximum number of allowed open connections to the database. Default 100."`
	MaxIdleConns       int      `` /* 135-byte string literal not displayed */
	DnsScanIntervalSec int      `` /* 171-byte string literal not displayed */
	LogLevel           string   `` /* 127-byte string literal not displayed */
}

func NewConfig

func NewConfig() *Config

func (*Config) Valid

func (c *Config) Valid() error

Jump to

Keyboard shortcuts

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