Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DbConfCluster = &gorose.DbConfigCluster{ Master: DbConfigMaster, Slave: []*gorose.DbConfigSingle{ DbConfigSalve, }, }
集群配置
View Source
var DbConfigMaster = &gorose.DbConfigSingle{ Driver: "mysql", EnableQueryLog: true, SetMaxOpenConns: 0, SetMaxIdleConns: 0, Prefix: "", Dsn: "gcore:gcore@tcp(192.168.200.248:3306)/test?charset=utf8", }
主库配置
View Source
var DbConfigSalve = &gorose.DbConfigSingle{ Driver: "mysql", EnableQueryLog: false, SetMaxOpenConns: 0, SetMaxIdleConns: 0, Prefix: "", Dsn: "gcore:gcore@tcp(192.168.200.248:3306)/test?charset=utf8", }
从库配置
Functions ¶
func GetConnection ¶
func GetConnection() *gorose.Connection
func GetConnectionCluster ¶
func GetConnectionCluster() *gorose.Connection
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.