1 Star 1 Fork 0

凡卡/libp2parea

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
message_id.go 690 Bytes
一键复制 编辑 原始数据 按行查看 历史
凡卡 提交于 2023-11-29 11:01 . first commit
package raft
import (
"gitee.com/prestonTao/libp2parea/engine"
)
var (
Version = uint64(0x00)
)
const (
MSGID_RaftVote = 3001 //投票同步
MSGID_RaftVote_recv = 3002 //投票同步 返回
MSGID_RaftVoteHeart = 3003 //心跳同步
MSGID_RaftVoteHeart_recv = 3004 //心跳同步 返回
)
func Register() {
//初始化Cache
RegisterRaft()
//注册消息ID
engine.RegisterMsg(MSGID_RaftVote, RaftVote)
engine.RegisterMsg(MSGID_RaftVote_recv, RaftVote_recv)
engine.RegisterMsg(MSGID_RaftVoteHeart, RaftVoteHeart)
engine.RegisterMsg(MSGID_RaftVoteHeart_recv, RaftVoteHeart_recv)
//定时同步数据
initTask()
//绑定CacheData模块
bindCacheData()
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/prestonTao/libp2parea.git
git@gitee.com:prestonTao/libp2parea.git
prestonTao
libp2parea
libp2parea
3aaa451ef873

搜索帮助

0d507c66 1850385 C8b1a773 1850385