cloudsqlproxy

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

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

Go to latest
Published: Mar 8, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnectionPool

func NewConnectionPool(config *ConnectionPoolConfiguration) (*sql.DB, error)

NewConnectionPool initializes a connection pool based on the provided configuration.

Types

type ConnectionPoolConfiguration

type ConnectionPoolConfiguration struct {
	// Database name
	DatabaseName string
	// Database username
	DatabaseUsername string
	// Database password
	DatabasePassword string
	// TCP hostname. If set, the connection pool will use TCP. Otherwise, it
	// will use Unix sockets.
	TcpHost string
	// Instance connection name. If TcpHost is set, this value will be ignored.
	InstanceConnectionName string
	// Maximum number of connections in idle connection pool
	MaxIdleConns int
	// Maximum number of open connections to the database
	MaxOpenConns int
	// Maximum time that a connection can remain open
	ConnMaxLifetime time.Duration
}

Jump to

Keyboard shortcuts

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