Versions in this module Expand all Collapse all v0 v0.2.1 Aug 7, 2020 Changes in this version + type PoolStats struct + AvgQueryTime time.Duration + Closed int64 + Idle int64 + Opened int64 + RealOpened int64 + TotalOpenWaitDuration int64 v0.2.0 Aug 7, 2020 Changes in this version + var DebugLogEnabled = false + var DefaultHealthCheckPeriod = 40 * time.Millisecond + var ErrNetwork = errors.New("Network error or connection refused") + var ErrNoConnection = errors.New("No connection available") + func RequireMasterCtx(parent context.Context) context.Context + func RequireReplicaCtx(parent context.Context) context.Context + type Driver interface + DriverName func() string + GetMaxConnLifetime func() time.Duration + GetMaxIdleConns func() int + GetMaxOpenConns func() int + GetMaxRetryCount func() int + SetMaxConnLifetime func(d time.Duration) + SetMaxIdleConns func(n int) + SetMaxOpenConns func(n int) + SetMaxRetryCount func(retry int) + func Register(driverName string) (Driver, error) + type Stmt interface + Close func() error + Exec func(...interface{}) (sql.Result, error) + Query func(...interface{}) (*sql.Rows, error) + QueryRow func(...interface{}) *sql.Row