Versions in this module Expand all Collapse all v0 v0.21.1 Nov 6, 2024 v0.21.0 Oct 28, 2024 Changes in this version + func ClientIdGen(args ...interface{}) string + type Client struct + func NewClient(cfg *Config) (client *Client, err error) + func (c *Client) Connect() (err error) + func (c *Client) Disconnect() + func (c *Client) IsConnected() bool + func (c *Client) Publish(topic string, payload interface{}) (err error) + func (c *Client) Subscribe(topic string, qos byte, callback MQTT.MessageHandler) (err error) + func (c *Client) Unsubscribe(topic string) (err error) + type Config struct + Broker string + CleanSession bool + ClientID string + ConnectTimeout int + KeepAlive int + Password string + PingTimeout int + Qos byte + Username string + type Subscribe struct + Callback MQTT.MessageHandler + Qos byte