slsPgx

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(value bool) *bool

func Float32

func Float32(value float32) *float32

func Int

func Int(value int) *int

Types

type Logger

type Logger interface {
	Info(message interface{})
	Failure(err error)
}

type SlsConn

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

func New

func New(config SlsConnConfigParams) *SlsConn

func (*SlsConn) Clean

func (s *SlsConn) Clean(ctx context.Context) (int, error)

func (SlsConn) Close

func (s SlsConn) Close(ctx context.Context) error

func (*SlsConn) Connect

func (s *SlsConn) Connect(ctx context.Context, connectionString string) error

func (*SlsConn) ConnectConfig added in v1.1.0

func (s *SlsConn) ConnectConfig(ctx context.Context, connConfig *pgx.ConnConfig) error

func (SlsConn) Exec

func (s SlsConn) Exec(ctx context.Context, sql string, args ...interface{}) (pgconn.CommandTag, error)

func (SlsConn) GetConnection

func (s SlsConn) GetConnection() *pgx.Conn

func (SlsConn) Query

func (s SlsConn) Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error)

type SlsConnConfigParams

type SlsConnConfigParams struct {
	MaxConnectionsFreqMs     *float32
	ManualMaxConnections     *bool
	MaxConnections           *int
	MinConnectionIdleTimeSec *float32
	MaxIdleConnectionsToKill *int
	ConnUtilization          *float32
	Debug                    *bool
	BackoffCapMs             *float32
	BackoffBaseMs            *float32
	BackoffDelayMs           *float32
	BackoffMaxRetries        *int
}

Jump to

Keyboard shortcuts

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