1 Star 1 Fork 0

灵狐/go-fox-edge-channel-common

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
EntityManageService.go 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
灵狐 提交于 2024-10-23 12:14 +08:00 . 初始化
package entityManager
import (
"gitee.com/fierce_wolf/go-fox-edge-common/commEntity"
"gitee.com/fierce_wolf/go-fox-edge-common/commEntityManager"
"gitee.com/fierce_wolf/go-fox-edge-common/commRedisService"
"gitee.com/fierce_wolf/go-fox-edge-common/commSql"
"gitee.com/fierce_wolf/go-fox-edge-common/commUtil/Map"
)
func Instance(others map[string]interface{}) {
producer := commRedisService.IRedisManager.GetRedisProducer()
consumer := commRedisService.IRedisManager.GetRedisConsumer()
consumer[commEntity.Type.ConfigEntity.Type()] = nil
consumer[commEntity.Type.ChannelEntity.Type()] = nil
Map.Append(consumer, others)
producer[commEntity.Type.ChannelStatusEntity.Type()] = nil
// 初始化数据库的字典
var entityTypes []string
for k1 := range consumer {
entityTypes = append(entityTypes, k1)
}
for k2 := range producer {
entityTypes = append(entityTypes, k2)
}
commSql.Instance(entityTypes)
}
func InitLoadEntity() {
commEntityManager.InitLoadEntity()
}
// Scheduler 线程函数
func Scheduler() {
commEntityManager.Scheduler()
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/fierce_wolf/go-fox-edge-channel-common.git
git@gitee.com:fierce_wolf/go-fox-edge-channel-common.git
fierce_wolf
go-fox-edge-channel-common
go-fox-edge-channel-common
v1.0.0

搜索帮助