Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MqttClient ¶
type MqttClient struct { MqttServerHost string MqttServerPort int ConfigPath string Config *viper.Viper Logger log.FieldLogger MqttClient interfaces.Client }
MqttClient contains the data needed to connect the client
func GetMqttClient ¶
func GetMqttClient(configPath string, onConnectHandler mqtt.OnConnectHandler, l log.FieldLogger) *MqttClient
GetMqttClient creates the mqttclient and returns it
func (*MqttClient) SendMessage ¶
SendMessage sends the message with the given payload to topic
func (*MqttClient) SendRetainedMessage ¶ added in v0.3.0
SendRetainedMessage sends the message with the given payload to topic
func (*MqttClient) WaitForConnection ¶ added in v0.3.0
func (mc *MqttClient) WaitForConnection(timeout int) error
WaitForConnection to mqtt server
Click to show internal directories.
Click to hide internal directories.