加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.go 625 Bytes
一键复制 编辑 原始数据 按行查看 历史
zhouce7 提交于 2020-12-15 17:29 . add rms poc
package main
import (
"github.com/sirupsen/logrus"
"huaweicloud-sample-rms-sync-resources/core"
"huaweicloud-sample-rms-sync-resources/task"
"log"
"net/http"
)
func main() {
task.AddFullSyncJob()
logrus.Info("Server started..")
// This interface is only used in test scenarios and can be manually invoked to trigger full synchronization
http.HandleFunc("/v1/sync", core.HandleFullSync)
// This interface is used to accept SMN messages, and verify the signature of SMN messages. Others have no right to call
http.HandleFunc("/v1/smn/notify", core.HandleSmnMessage)
log.Fatal(http.ListenAndServe(":7777", nil))
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化