opt: standard upf output
This commit is contained in:
@@ -11,17 +11,6 @@ import (
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
type DbConfig struct {
|
||||
Type string `yaml:"type"`
|
||||
User string `yaml:"user"`
|
||||
Password string `yaml:"password"`
|
||||
Host string `yaml:"host"`
|
||||
Port string `yaml:"port"`
|
||||
Name string `yaml:"name"`
|
||||
ConnParam string `yaml:"connParam,omitempty"`
|
||||
Backup string `yaml:"backup"`
|
||||
}
|
||||
|
||||
// Yaml struct of config
|
||||
type YamlConfig struct {
|
||||
Logger struct {
|
||||
@@ -110,16 +99,7 @@ type YamlConfig struct {
|
||||
} `yaml:"smsc"`
|
||||
} `yaml:"alarm"`
|
||||
|
||||
MML struct {
|
||||
Port int `yaml:"port"`
|
||||
Port2 int `yaml:"port2"`
|
||||
Sleep int64 `yaml:"sleep"`
|
||||
DeadLine int64 `yaml:"deadLine"`
|
||||
User string `yaml:"user"`
|
||||
Password string `ymal:"password"`
|
||||
MmlHome string `yaml:"mmlHome"`
|
||||
Upload string `yaml:"upload"`
|
||||
} `yaml:"mml"`
|
||||
MML MMLParam `yaml:"mml"`
|
||||
|
||||
NE struct {
|
||||
Addr string `yaml:"addr"`
|
||||
@@ -171,6 +151,31 @@ type RestParam struct {
|
||||
KeyFile string `yaml:"keyFile"`
|
||||
}
|
||||
|
||||
type DbConfig struct {
|
||||
Type string `yaml:"type"`
|
||||
User string `yaml:"user"`
|
||||
Password string `yaml:"password"`
|
||||
Host string `yaml:"host"`
|
||||
Port string `yaml:"port"`
|
||||
Name string `yaml:"name"`
|
||||
ConnParam string `yaml:"connParam,omitempty"`
|
||||
Backup string `yaml:"backup"`
|
||||
}
|
||||
|
||||
type MMLParam struct {
|
||||
Port int `yaml:"port"`
|
||||
Port2 int `yaml:"port2"`
|
||||
Sleep int64 `yaml:"sleep"`
|
||||
DeadLine int64 `yaml:"deadLine"`
|
||||
SizeRow byte `yaml:"sizeRow"`
|
||||
SizeCol byte `yaml:"sizeCol"`
|
||||
BufferSize int `yaml:"bufferSize"`
|
||||
User string `yaml:"user"`
|
||||
Password string `ymal:"password"`
|
||||
MmlHome string `yaml:"mmlHome"`
|
||||
Upload string `yaml:"upload"`
|
||||
}
|
||||
|
||||
type TestDatas struct {
|
||||
UDM struct {
|
||||
CapUsed uint32 `yaml:"capUsed"`
|
||||
@@ -211,6 +216,11 @@ func NewYamlConfig() YamlConfig {
|
||||
Type: "mysql",
|
||||
ConnParam: "charset=utf8mb4&collation=utf8mb4_general_ci&parseTime=True&interpolateParams=True",
|
||||
},
|
||||
MML: MMLParam{
|
||||
SizeRow: 100,
|
||||
SizeCol: 128,
|
||||
BufferSize: 65535,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,6 +73,9 @@ mml:
|
||||
port2: 5002
|
||||
sleep: 200
|
||||
deadLine: 10
|
||||
sizeRow: 100
|
||||
sizeCol: 128
|
||||
bufferSize: 65535
|
||||
user: admin
|
||||
password: admin
|
||||
mmlHome: ./mmlhome
|
||||
|
||||
@@ -13,6 +13,7 @@ import (
|
||||
"be.ems/features/event"
|
||||
"be.ems/features/fm"
|
||||
"be.ems/features/lm"
|
||||
"be.ems/features/mml"
|
||||
"be.ems/features/pm"
|
||||
"be.ems/lib/dborm"
|
||||
"be.ems/lib/global"
|
||||
@@ -227,6 +228,8 @@ func main() {
|
||||
os.Exit(4)
|
||||
}
|
||||
|
||||
mml.InitMML()
|
||||
|
||||
// 将 mux.Router 注册到 gin.Engine
|
||||
|
||||
// 默认路由组
|
||||
|
||||
Reference in New Issue
Block a user