zhangzengfei
2023-08-11 a335f66c4c520728be640ca4e7029ce6f45b8f3d
config/config.go
@@ -9,6 +9,8 @@
)
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
@@ -22,6 +24,8 @@
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"