Ai
1 Star 0 Fork 0

江苏艾雨文承养老机器人有限公司/aywc_judge_notice

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.go 906 Bytes
一键复制 编辑 原始数据 按行查看 历史
dtal 提交于 2021-06-06 12:41 +08:00 . 跌倒发现重拍
package main
import (
"gitee.com/aywc_1/aywc_judge/src/appinit"
"gitee.com/aywc_1/aywc_judge/src/configuration"
"gitee.com/aywc_1/aywc_judge/src/lib"
"gitee.com/aywc_1/aywc_judge_notice/src/websocket2"
log "github.com/sirupsen/logrus"
"net/http"
)
//var Addr=flag.String("addr",":8083","websocket service address")
func main() {
configuration.InitLog("notice")
log.Info("Starting websocket application...")
err := appinit.DBInit()
if err != nil {
log.Fatal(err)
}
lib.NewMQ()
client := lib.GetMQ()
err = client.Channel.Qos(10, 0, false)
if err != nil {
log.Fatal(err)
}
port := configuration.GetYamlValue([]string{"config", "websocket", "port"}, 0, ":8083").(string)
go websocket2.Manager.Start()
go websocket2.Manager.GetMQData(client)
http.HandleFunc("/ws/echo", websocket2.Echo)
http.HandleFunc("/ws/exit", websocket2.Exit)
log.Info(port)
http.ListenAndServe(port, nil)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/aywc_1/aywc_judge_notice.git
git@gitee.com:aywc_1/aywc_judge_notice.git
aywc_1
aywc_judge_notice
aywc_judge_notice
1f3ab306c158

搜索帮助