config

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MysqlDatabase

type MysqlDatabase struct {
	Host                  string        `json:"host"`
	Port                  int           `json:"port"`
	User                  string        `json:"user"`
	Password              string        `json:"password"`
	Database              string        `json:"database"`
	Charset               string        `json:"charset"`
	MaxIdleConnections    int           `json:"maxIdleConnections" yaml:"maxIdleConnections"`
	ConnectionMaxIdleTime time.Duration `json:"connectionMaxIdleTime" yaml:"connectionMaxIdleTime"`
	MaxOpenConnections    int           `json:"maxOpenConnections" yaml:"maxOpenConnections"`
	ConnectionMaxLifeTime time.Duration `json:"connectionMaxLifeTime" yaml:"connectionMaxLifeTime"`
}

type MysqlSetting

type MysqlSetting struct {
	Default    *MysqlDatabase `json:"default"`
	EnableRead bool           `json:"enableRead" yaml:"enableRead"`
	Read       *MysqlDatabase `json:"read,omitempty" yaml:"read,omitempty"`
}
var Setting *MysqlSetting = &MysqlSetting{
	Default: &MysqlDatabase{

		ConnectionMaxIdleTime: time.Second * 30,
		MaxIdleConnections:    10,

		ConnectionMaxLifeTime: time.Second * 180,
		MaxOpenConnections:    128,
	},
	EnableRead: false,
	Read: &MysqlDatabase{

		ConnectionMaxIdleTime: time.Second * 30,
		MaxIdleConnections:    10,

		ConnectionMaxLifeTime: time.Second * 180,
		MaxOpenConnections:    128,
	},
}

Jump to

Keyboard shortcuts

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