2017-08-04 08:20:59 +00:00
|
|
|
|
package hotime
|
|
|
|
|
|
|
|
|
|
import "sync"
|
|
|
|
|
|
|
|
|
|
//var Config = struct {
|
|
|
|
|
// LogLevel int
|
|
|
|
|
//}{
|
|
|
|
|
// LogLevel: LOG_FMT, //日志等级处理,LogFmt,显示所有错误到控制台,LogNil不记录任何错误
|
|
|
|
|
//}
|
|
|
|
|
var mutex = map[interface{}]*sync.RWMutex{} //安全锁
|
|
|
|
|
var mutexer = sync.RWMutex{} //读写锁
|
2017-08-10 10:14:56 +00:00
|
|
|
|
var IsRun = false //当前状态
|
|
|
|
|
var application = map[string]*App{} //整个项目
|
|
|
|
|
|
2017-08-04 08:20:59 +00:00
|
|
|
|
//var Db = HoTimeDB{} //数据库实例
|
|
|
|
|
|
|
|
|
|
var Config = Map{
|
|
|
|
|
"tpt": "tpt",
|
|
|
|
|
"logLevel": LOG_FMT,
|
|
|
|
|
"defFile": []string{"index.html", "index.htm"},
|
|
|
|
|
"dbHost": "127.0.0.1",
|
|
|
|
|
//"dbHost":"localhost",
|
2017-08-10 10:14:56 +00:00
|
|
|
|
"dbName": "test",
|
|
|
|
|
"dbUser": "root",
|
|
|
|
|
"dbPwd": "root",
|
|
|
|
|
"dbPort": "3306",
|
|
|
|
|
"port": "80",
|
2017-08-04 08:20:59 +00:00
|
|
|
|
"cacheShortTime": 60 * 60 * 2,
|
2017-08-10 10:14:56 +00:00
|
|
|
|
"cacheLongTime": 60 * 60 * 24 * 30,
|
|
|
|
|
"sessionName": "HOTIME",
|
|
|
|
|
"error": Map{},
|
2017-08-04 08:20:59 +00:00
|
|
|
|
}
|