Documentation
¶
Overview ¶
Package mqtt provides functionalities to handle the client connection to the broker using MQTT
Package mqtt provides functionalities to handle the client connection to the broker using MQTT
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartMQTTClient ¶
func StartMQTTClient(brokerURL string)
StartMQTTClient is used to initiate the client and set the configuration
Types ¶
type Client ¶
type Client struct { ID string Host string Port uint Qos byte sync.RWMutex ClientOptions *MQTT.ClientOptions MQTT.Client }
Client is a wrapper on top of `MQTT.Client`
func (*Client) Connect ¶
Connect creates a new mqtt client and uses the ClientOptions generated in the NewClient function to connect with the provided host and port.
func (*Client) Disconnect ¶ added in v1.1.4
Disconnect disconnects the connection
func (*Client) IsConnected ¶ added in v1.1.4
IsConnected checks if the client is connected or not
func (*Client) SetBrokerURL ¶
SetBrokerURL returns the broker url for connection
Click to show internal directories.
Click to hide internal directories.