Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MQTTConfig ¶
func MQTTConfig(broker, username, password string) *MQTT.ClientOptions
func MQTTConfigFromYAML ¶
func MQTTConfigFromYAML(file string) (*MQTT.ClientOptions, error)
func NewSHA1Hash ¶
func RandomString ¶
Types ¶
type MQTTClient ¶
type MQTTClient struct {
// contains filtered or unexported fields
}
func MQTTInit ¶
func MQTTInit(broker, user, password string) (MQTTClient, error)
func (MQTTClient) Publish ¶
func (mqtt MQTTClient) Publish(topic string, payload interface{})
func (MQTTClient) Subscribe ¶
func (mqtt MQTTClient) Subscribe(topic string, cb MQTT.MessageHandler) error
func (MQTTClient) Unsubscribe ¶
func (mqtt MQTTClient) Unsubscribe(topics ...string) error
Click to show internal directories.
Click to hide internal directories.