xqconf

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitMySqlDatabase

func InitMySqlDatabase(cfg *MysqlConfig, dbInstance ...string)

InitMySqlDatabase 初始化mysql数据库数据库连接

Types

type MysqlClusterConfig

type MysqlClusterConfig struct {
	MysqlSingleConfig
	Master []MysqlSingleConfig `json:"master"`
	Slave  []MysqlSingleConfig `json:"slave"`
}

type MysqlConfig

type MysqlConfig struct {
	Cluster bool               `json:"cluster"`
	Options MysqlClusterConfig `json:"options"`
}

mysql 数据库配置

type MysqlSingleConfig

type MysqlSingleConfig struct {
	Charset     string `json:"charset"`
	ParseTime   bool   `json:"parse_time"`
	Protocol    string `json:"protocol"`
	Host        string `json:"host"`
	Port        int    `json:"port"`
	User        string `json:"user"`
	Password    string `json:"password"`
	Prefix      string `json:"prefix"`
	DB          string `json:"db"`
	MaxOpenCons int    `json:"max_open_cons"`
	MaxIdleCons int    `json:"max_idle_cons"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL