Documentation ¶
Index ¶
Constants ¶
View Source
const ( MAX_IDLE_CONNS = 2 MAX_OPEN_CONNS = 4 CONN_MAX_LiFE_TIME = 300 CONN_MAX_IDLE_TIME = 300 )
Variables ¶
View Source
var ( ErrNameInvalid error = errors.New("name invalid") ErrUserNameInvalid error = errors.New("username invalid") ErrPassWordInvalid error = errors.New("password invalid") ErrMasterInvalid error = errors.New("master invalid") ErrIPInvalid error = errors.New("IP invalid") ErrDBNameInvalid error = errors.New("DB name invalid") ErrDBLoggerNil error = errors.New("DB logger nil") )
Functions ¶
func CloseMysql ¶
func CloseMysql() error
func NewMysqlSingle ¶
func NewMysqlSingle(ms []MConfigInfo, l Logger) error
The NewMysqlSingle function provides a way to instantiate mysql through configuration. If using the NewMysqlSingle function, use the GetClient function provided in the package to manipulate the mClient instance.
Types ¶
Click to show internal directories.
Click to hide internal directories.