config

package
v0.0.0-...-0b73d59 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig()

Types

type Config

type Config struct {
	APIAddress      string `default:":80"`
	APIRequestLimit int    `default:"256"`
	APITick         int    `default:"60"`
	ModuleSmallTick int    `default:"60"`
	ModuleBigTick   int    `default:"86400"`
	DBType          DBType `default:"sqlite"`
	DSN             string `default:"elling.db"`
	RedisConn       string `default:"127.0.0.1:6379"`
	RedisMaxIdle    int    `default:"3"`
	RedisTimeout    int    `default:"240"`
	RedisPassword   string `default:"redispassword"`
	SlowDBThreshold int64  `default:"400"`
	LogLevel        string `default:"trace"`
	MachineID       string `default:"ip"`
	StartTime       int64  `default:"1640995200000"`
	IsMaster        bool   `default:"false"`
}
var AppConfig Config

type DBType

type DBType string
const (
	MySQL      DBType = "mysql"
	PostgreSQL DBType = "postgresql"
	SQLite     DBType = "sqlite"
)

Jump to

Keyboard shortcuts

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