Documentation
¶
Overview ¶
Package mqtt provides a bit of glue common between Skogul's MQTT sender and receiver. Mostly providing mechanisms for setting up and maintaining a connection to a broker. You really should not include this directly. Use the MQTT sender and receiver instead.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MQTT ¶
MQTT contains an MQTT client, its options and its configuration for handling messages
func (*MQTT) Subscribe ¶
func (handler *MQTT) Subscribe(topic string, callback MessageHandler)
Subscribe to a topic. callback is called whenever a message is received. This also deals with re-subscribing when a reconnect takes place.
type MessageHandler ¶
MessageHandler is used to establish a callback when a message is received.
Click to show internal directories.
Click to hide internal directories.