liuxiaolong
2021-04-02 a35153875f213929601a39c47f0823b310210321
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)
}