Watch mqtt topic to control simulator car

This commit is contained in:
2021-01-23 12:30:59 +01:00
parent 0f79efacf2
commit e819f61d1b
2 changed files with 62 additions and 6 deletions

View File

@ -131,6 +131,10 @@ type Publisher interface {
Publish(topic string, payload []byte) error
}
func NewMqttPublisher(client mqtt.Client) *MqttPublisher {
return &MqttPublisher{client: client}
}
type MqttPublisher struct {
client mqtt.Client
}