package
Version:
v0.0.0-...-750a8a5
Opens a new window with list of versions in this module.
Published: Oct 10, 2021
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func Subscribe(onMessage mqtt.MessageHandler, qos byte, topics ...string) error
订阅
type Config struct {
Broker string `json:"broker" yaml:"broker"`
ClientID string `json:"client_id" yaml:"client_id" mapstructure:"client_id"`
KeepAlive int64 `json:"keep_alive" yaml:"keep_alive" mapstructure:"keep_alive"`
}
type Message struct {
ClientID string `json:"client_id"`
Data interface{} `json:"data"`
Time int64 `json:"time"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.