liuxiaolong
2021-02-05 7cf6b23c83e1c4efb8567a16ab2f401be4b6d1bf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package bhomeclient
 
import "basic.com/valib/bhomebus.git"
 
type Broker interface {
    //发布到本机
    Publish(topic string, msg []byte) error
 
    //发布到远程机器
    PublishNet(nodes []bhomebus.NetNode, topic string, msg []byte) error
 
    //订阅一些主题,可动态新增
    Subscribe(topics []string)
 
    //注销订阅的主题
    DeSub(topics []string)
}