12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- package config
- import (
- spider_com "KeyWebsiteMonitor/util"
- )
- type (
- Config struct {
- RunModel string `yaml:"run_model"`
- WebsocketURL string `yaml:"websocket_url"` //仅远程浏览器有用
- ProxyAddr string `yaml:"proxy_address"` //仅本地浏览器有用
- HeadLess bool `yaml:"headless"`
- ShowImage bool `yaml:"show_image"`
- StorageType string `yaml:"storage"`
- StorageMongoURI string `yaml:"mongo_address"`
- StorageMongoDB string `yaml:"mongo_db"`
- StorageMongoCollection string `yaml:"mongo_colesstion"`
- StorageFile string `yaml:"storage_file"`
- WeChatRobotURL string `yaml:"wechat_robot_url"`
- DownloadPath string `yaml:"download_path"`
- CronTime string `yaml:"cron_time"`
- CronLuaconfig string `yaml:"cron_luaconfig"`
- GetTaskUrl string `yaml:"get_task_url"`
- MongoSpiderAddress string `yaml:"mongo_spider_address"`
- MongoSpiderDb string `yaml:"mongo_spider_db"`
- MongoCommonAddress string `yaml:"mongo_common_address"`
- MongoCommonDb string `yaml:"mongo_common_db"`
- Redisaddrs string `yaml:"redisaddrs"`
- Name string `yaml:"name"`
- CompletionTaskUrl string `yaml:"completion_task_url"`
- }
- )
- var (
- Sysconfig *Config = new(Config)
- )
- // init
- func init() {
- // JyLogInit()
- // time.Sleep(2 * time.Second)
- spider_com.LoadConfig("./config.yaml", Sysconfig)
- }
|