| | |
| | | ) |
| | | |
| | | type Config struct { |
| | | ParentId string `json:"parent_id"` // 主账号id, 用于请求web接口 |
| | | JWTKey string `json:"jwt_key"` // 生成jwt的key |
| | | NsqServer string `json:"nsq_server"` // nsq TCP服务端地址 |
| | | PubPLCDataTopic string `json:"pub_plc_data_topic"` // 发布plc数据的topic |
| | | WritePLCDataTopic string `json:"write_plc_data_topic"` // 接收plc配置数据的topic |
| | |
| | | var Options Config |
| | | |
| | | func DefaultConfig() { |
| | | Options.ParentId = "guangsheng" |
| | | Options.JWTKey = "abcdefghijklmn" |
| | | Options.NsqServer = "fai365.com:4150" |
| | | Options.PubPLCDataTopic = "aps.factory.plc.livedata" |
| | | Options.WritePLCDataTopic = "aps.factory.plc.write" |