File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ type Bus struct {
14
14
client MQTT.Client
15
15
}
16
16
17
- func (mqtt Bus ) Initialize (config config.MqttConfig ) {
17
+ func (mqtt * Bus ) Initialize (config config.MqttConfig ) {
18
18
fmt .Println ("Initializing MQTT bus..." )
19
19
mqttOpts := MQTT .NewClientOptions ().AddBroker ("tcp://" + config .Server + ":" + config .Port )
20
20
mqttOpts .SetUsername (config .Username )
@@ -45,7 +45,7 @@ func (mqtt Bus) Initialize(config config.MqttConfig) {
45
45
mqtt .SendMessage (config .TopicRoot + "/alarmserver" , `{ "status": "up" }` )
46
46
}
47
47
48
- func (mqtt Bus ) SendMessage (topic string , payload interface {}) {
48
+ func (mqtt * Bus ) SendMessage (topic string , payload interface {}) {
49
49
if ! mqtt .client .IsConnected () {
50
50
fmt .Println ("MQTT: CLIENT NOT CONNECTED" )
51
51
return
You can’t perform that action at this time.
0 commit comments