liuxiaolong
2020-03-12 0c9642be9fb9ed7efa5330d67551bb78b47e0d10
pubsub.go
@@ -4,18 +4,27 @@
   Publish(Message)
   Surveyor() []string
   Recv() chan Message
   GetCliInfo() map[string][]byte
   SetResp([]byte)
}
type Message struct {
   Id string
   Topic string
   Msg []byte
}
const (
   Topic_Camera = "camera"  //摄像机消息
   Topic_Camera = "camera"  //摄像机解码消息
   Topic_StackDecode = "stackDecode" //数据栈解码消息
   Topic_Task = "task" //任务消息
   Topic_Sdk = "sdk" //算法消息
    Topic_RuleProc = "ruleProcess" //ruleProcess消息
   Topic_Event = "event" //事件消息
)
@@ -26,4 +35,4 @@
//processId is process Identifier,unique
func NewSubscriber(url string,heartBeatUrl string,mode int,topics []string,processId string) (PubSub,error) {
   return newSub(url,heartBeatUrl, topics, processId)
}
}