LAPP标准接口程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
953 B

package global
import (
"github.com/go-xorm/xorm"
"sync"
"time"
)
var TimezoneLocation *time.Location
var DatabaseDsn string
var MongoDsn string
type TaskRecord struct {
TaskMap map[int]time.Time
TaskTimeMap map[int]string
Lock sync.RWMutex
}
type DriverMap struct {
Lock sync.RWMutex
Map map[int]*xorm.Engine
}
type ETLTaskStatus struct {
Lock sync.Mutex
Map map[int]bool
}
var ETLDriver DriverMap
var ETLTaskRecord TaskRecord
var TaskExtractStatusMap ETLTaskStatus
var TaskLoadStatusMap ETLTaskStatus
var ShellPath string
var TransferFuncLi = []string{
"StringToInt",
"IntToString",
"DecimalToIntRound",
"DecimalToIntAbandon",
"DecimalToIntCeil",
"DecimalToIntFloor",
}
func init() {
TaskExtractStatusMap.Map = make(map[int]bool)
TaskLoadStatusMap.Map = make(map[int]bool)
ETLDriver.Map = make(map[int]*xorm.Engine)
ETLTaskRecord.TaskMap = make(map[int]time.Time)
ETLTaskRecord.TaskTimeMap = make(map[int]string)
}