pgr

package
v0.0.0-...-2c4df64 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2018 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFromFile

func InitFromFile(file string) (p *pgx.ConnPool, e error)

func InitFromYaml

func InitFromYaml(yamldata []byte) (p *pgx.ConnPool, e error)

func SetLogger

func SetLogger(l *logger.Logger)

Types

type Conf

type Conf struct {
	Host                 string // host (e.g. localhost) or path to unix domain socket directory (e.g. /private/tmp)
	Port                 uint16 // default: 5432
	Database             string
	User                 string // default: OS user name
	Password             string //TLSConfig         *tls.Config // config for TLS connection -- nil disables TLS
	UseFallbackTLS       bool   // Try FallbackTLSConfig if connecting with TLSConfig fails. Used for preferring TLS, but allowing unencrypted, or vice-versa 	//FallbackTLSConfig *tls.Config // config for fallback TLS connection (only used if UseFallBackTLS is true)-- nil disables TLS
	LogLevel             int
	RuntimeParams        map[string]string // Run-time parameters to set on connection as session default values (e.g. search_path or application_name)
	PreferSimpleProtocol bool
	MaxConnections       int
	AcquireTimeout       time.Duration
}

func (*Conf) CreatePool

func (c *Conf) CreatePool() (p *pgx.ConnPool, e error)

Jump to

Keyboard shortcuts

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