fix
liuxiaolong
2020-01-13 39b2eeeb1229b266c2a77937982a3c363d94d14d
pubsub.go
@@ -2,7 +2,7 @@
type PubSub interface {
   Publish([]byte)
   Publish(Message)
   Recv() chan Message
}
@@ -19,10 +19,11 @@
   Topic_Event = "event" //事件消息
)
func NewPublisher(url string,mode int) (PubSub,error) {
   return newPub(url)
func NewPublisher(url string,heartBeatUrl string,mode int) (PubSub,error) {
   return newPub(url,heartBeatUrl)
}
func NewSubscriber(url string,mode int,topics []string) (PubSub,error) {
   return newSub(url, topics)
//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)
}