11 lines
365 B
Go
11 lines
365 B
Go
package zciyon
|
|
|
|
type CiyMQ interface { //消息队列,消峰,内存中转。尽量用管道
|
|
Connect(con string) error
|
|
Disconnect() error
|
|
Publish(topic string, data []byte) error //发布数据
|
|
Receive(topic string, fn func(topic string, data []byte)) error //接收订阅数据
|
|
Unsubscribe(topics string) error
|
|
IsConnected() bool
|
|
}
|