config

package
v0.0.35 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseSetting

type DatabaseSetting struct {
	// Common Settings
	Enabled               bool          `json:"enabled"`
	Driver                string        `json:"driver"`
	TablePrefix           string        `json:"tablePrefix" yaml:"tablePrefix"`
	SlowThreshold         time.Duration `json:"slowThreshold" yaml:"slowThreshold"`
	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"`

	// Driver Settings
	Mysql *MysqlConfig.MysqlSetting `json:"mysql" yaml:"mysql"`
}
var Setting *DatabaseSetting = &DatabaseSetting{
	Enabled: false,

	SlowThreshold: time.Second * 10,

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

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

	Mysql: MysqlConfig.Setting,
}

Jump to

Keyboard shortcuts

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