Documentation ¶
Index ¶
- Constants
- func ErrIsDuplicateEntryError(err error) bool
- func ErrIsLockError(err error) bool
- type Conn
- func (c *Conn) Close(context.Context) error
- func (c *Conn) NewSession(name string, timeout time.Duration) (*dbr.Session, error)
- func (c *Conn) NewSessionForEventReceiver(er health.EventReceiver) *dbr.Session
- func (c *Conn) SetConnMaxIdleTime(d time.Duration)
- func (c *Conn) SetConnMaxLifetime(d time.Duration)
- func (c *Conn) SetMaxIdleConns(n int)
- func (c *Conn) SetMaxOpenConns(n int)
Constants ¶
View Source
const ( DriverMysql = "mysql" DriverNone = "" )
View Source
const ( RemovedPassword = "[removed]" DeadlockDBErrorMessage = "Deadlock found when trying to get lock; try restarting transaction" TimeoutDBErrorMessage = "Lock wait timeout exceeded; try restarting transaction" )
Variables ¶
This section is empty.
Functions ¶
func ErrIsLockError ¶
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is a wrapper around a dbr connection and a health stream
func (*Conn) NewSession ¶
func (*Conn) NewSessionForEventReceiver ¶
func (c *Conn) NewSessionForEventReceiver(er health.EventReceiver) *dbr.Session
func (*Conn) SetConnMaxIdleTime ¶
func (*Conn) SetConnMaxLifetime ¶
func (*Conn) SetMaxIdleConns ¶
func (*Conn) SetMaxOpenConns ¶
Click to show internal directories.
Click to hide internal directories.