| | |
| | | ) |
| | | |
| | | type NodeList struct { |
| | | Ip string `json:"ip"` |
| | | Port int `json:"port"` |
| | | Ip string `json:"ip"` |
| | | Port int `json:"port"` |
| | | } |
| | | |
| | | const ( |
| | |
| | | } |
| | | |
| | | type RegisterInfo struct { |
| | | Proc ProcInfo `json:"proc"` // 进程的信息 |
| | | Channel []string `json:"channel"` // 新增频道,对应一个新的共享内存队列 |
| | | PubTopic []string `json:"pubTopic"` // 进程对外发布的服务主题 |
| | | SubTopic []string `json:"subTopic"` // 进程订阅的服务主题 |
| | | } |
| | | |
| | | |
| | | type RegisterReply struct { |
| | | TCPProxyIP string `json:"tcpProxyIP"` // BHomeCenter启动的tcp代理服务器IP |
| | | TCPProxyPort int `json:"tcpProxyPort"` // BHomeCenter启动的tcp代理服务器端口 |
| | | HeartbeatKey int `json:"heartbeatKey"` // client发送心跳的key |
| | | ReplyKey int `json:"replyKey"` // client的应答服务key |
| | | ChannelKey map[string]int `json:"channelKey"` // client的chan对应的key |
| | | QueryTopicKey int `json:"queryTopicKey"` // client查询topic对应的key时用到的key |
| | | Status int `json:"status"` // 请求状态,目前只有两个,成功返回200,失败202 |
| | | } |
| | | |
| | | type HeartBeatInfo struct { |
| | | Proc ProcInfo `json:"proc"` // 进程的信息 |
| | | HealthLevel string `json:"healthLevel"` // 健康等级 |
| | | Fps int `json:"fps"` // 处理帧率(dec解码帧率、sdk处理帧率) |
| | | WarnInfo string `json:"warnInfo"` // 报警信息 |
| | | ErrorInfo string `json:"errorInfo"` // 错误信息 |
| | | OtherInfo []byte `json:"otherInfo"` // 其他特有信息,如有需要就用这个 |
| | | OtherInfoSize int `json:"otherInfoSize"` // 其他特有信息长度 |
| | | } |
| | | |
| | | type HeartBeatReply struct { |
| | | Status int `json:"status"` // 请求状态,目前只有两个,成功返回200,失败202 |
| | | Desc string `json:"desc"` // 请求状态的描述,成功"success",失败返回失败原因,如心跳服务未启动 |
| | | } |
| | | |
| | | type MsgInfo struct { |
| | | SrcProc ProcInfo `json:"srcProc"` // 源进程基本信息 |
| | | MsgType string `json:"msgType"` // 数据类型,可为请求、发布、订阅、应答等 |
| | | Topic string `json:"topic"` // 请求的函数,并不对应任何的shmKey,业务层的topic |
| | | Body []byte `json:"body"` // 请求内容 |
| | | Proc ProcInfo `json:"proc"` // 进程的信息 |
| | | Channel []string `json:"channel"` // 新增频道,对应一个新的共享内存队列 |
| | | PubTopic []string `json:"pubTopic"` // 进程对外发布的服务主题 |
| | | SubTopic []string `json:"subTopic"` // 进程订阅的服务主题 |
| | | } |
| | | |
| | | |