Documentation
¶
Index ¶
Constants ¶
View Source
const ( DtmMetricsPort = 8889 Mysql = "mysql" Redis = "redis" BoltDb = "boltdb" )
Variables ¶
View Source
var Config = configType{}
Config 配置
Functions ¶
func MustLoadConfig ¶
func MustLoadConfig(confFile string)
MustLoadConfig load config from env and file
Types ¶
type MicroService ¶
type MicroService struct { Driver string `yaml:"Driver" default:"default"` Target string `yaml:"Target"` EndPoint string `yaml:"EndPoint"` }
MicroService config type for micro service
type Store ¶
type Store struct { Driver string `yaml:"Driver" default:"boltdb"` Host string `yaml:"Host"` Port int64 `yaml:"Port"` User string `yaml:"User"` Password string `yaml:"Password"` MaxOpenConns int64 `yaml:"MaxOpenConns" default:"500"` MaxIdleConns int64 `yaml:"MaxIdleConns" default:"500"` ConnMaxLifeTime int64 `yaml:"ConnMaxLifeTime" default:"5"` DataExpire int64 `yaml:"DataExpire" default:"604800"` // Trans data will expire in 7 days. only for redis/boltdb. RedisPrefix string `yaml:"RedisPrefix" default:"{a}"` // Redis storage prefix. store data to only one slot in cluster TransGlobalTable string `yaml:"TransGlobalTable" default:"dtm.trans_global"` TransBranchOpTable string `yaml:"BranchTransOpTable" default:"dtm.trans_branch_op"` }
Click to show internal directories.
Click to hide internal directories.