Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Global = Config{ ServiceName: "rogue-collector", App: App{ HttpHost: "", HttpPort: 0, }, Etcd: Etcd{ Endpoints: []string{"127.0.0.1:2379"}, }, MongoDB: MongoDB{ DSN: "mongodb://127.0.0.1:27017", }, Collect: Collect{ Source: "net126", CodeList: []string{ "sh688***", "sh605***", "sh603***", "sh601***", "sh600***", "sz300***", "sz0030**", "sz002***", "sz001**", "sz000***", }, Crontab: "05 17 * * MON,TUE,WED,THU,FRI", RandomWait: "10,30", }, Log: Log{ DisableTimestamp: false, Level: "info", Format: "text", MaxSize: 20, Dir: "../log", }, }
Functions ¶
func SetupLogger ¶
Types ¶
type Config ¶
type Config struct { ServiceName string `json:"service-name" toml:"service-name"` App App `json:"app" toml:"app"` Etcd Etcd `json:"etcd" toml:"etcd"` MongoDB MongoDB `json:"mongodb" toml:"mongodb"` Collect Collect `json:"collect" toml:"collect"` Log Log `json:"log" toml:"log"` }
func (*Config) FindAndLoad ¶
Click to show internal directories.
Click to hide internal directories.