| | |
| | | PORT_DEFAULTPROXY int = 5000 |
| | | KEY_REGISTER int = 101 //处理TOPIC_REGISTER / TOPIC_LEAVE和TOPIC_UPDATETOPIC |
| | | KEY_HEARTBEAT int = 102 //处理TOPIC_HEARTBEAT |
| | | KEY_QUERY int = 103 //处理TOPIC_QUERYKEY和TOPIC_QUERYTOPIC |
| | | KEY_QUERY int = 103 //处理TOPIC_QUERYKEY和TOPIC_QUERYTOPIC和TOPIC_QUERYPROC |
| | | ) |
| | | |
| | | const ( |
| | |
| | | TOPIC_UPDATETOPIC string = "Topic_UpdateTopic" |
| | | TOPIC_QUERYKEY string = "Topic_QueryKey" |
| | | TOPIC_QUERYTOPIC string = "Topic_QueryTopic" |
| | | TOPIC_QUERYPROC string = "Topic_QueryProc" |
| | | ) |
| | | |
| | | const ( |
| | |
| | | SvrInfo ServerInfo `json:"svrInfo"` //节点基本信息 |
| | | Topic2Key map[string]int `json:"topic2Key"` //topic-replyKey的对应关系 |
| | | Status int `json:"status"` //节点状态 |
| | | } |
| | | |
| | | |
| | | //已注册的Proc进程信息 |
| | | type RegisteredClient struct { |
| | | Info RegisterInfo `json:"info"` |
| | | ReplyKey int `json:"replyKey"` |
| | | HeartbeatCount int `json:"heartbeatCount"` |
| | | DeadCount int `json:"deadCount"` |
| | | Status int `json:"status"` |
| | | } |