Documentation ¶
Index ¶
Constants ¶
View Source
const ( DriverMySQL = "mysql" DriverPostgres = "postgres" )
Driver list
Variables ¶
This section is empty.
Functions ¶
func GetMongoClient ¶
Types ¶
type Client ¶
type DB ¶
type DB struct { DBConnection *sqlx.DB DBString string RetryInterval int MaxIdleConn int MaxConn int // contains filtered or unexported fields }
DB configuration
func (*DB) ConnectAndMonitor ¶
ConnectAndMonitor to database
type DBConfig ¶
type DBConfig struct { SlaveDSN string `json:"slave_dsn" mapstructure:"slave_dsn"` MasterDSN string `json:"master_dsn" mapstructure:"master_dsn"` RetryInterval int `json:"retry_interval" mapstructure:"retry_interval"` MaxIdleConn int `json:"max_idle" mapstructure:"max_idle"` MaxConn int `json:"max_con" mapstructure:"max_con"` }
DBConfig for databases configuration
type Database ¶
func MongoConnectClient ¶
Click to show internal directories.
Click to hide internal directories.