Created
July 9, 2024 21:06
-
-
Save BK1031/5c5888337b39a85e3205c70c76debc1f to your computer and use it in GitHub Desktop.
racecar_analytics mqtt subscription functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func SubscribeECU() { | |
Client.Subscribe("ingest/ecu", 0, func(client mqtt.Client, msg mqtt.Message) { | |
fmt.Println("[MQ] Received ecu message") | |
}) | |
} | |
func SubscribeBattery() { | |
Client.Subscribe("ingest/battery", 0, func(client mqtt.Client, msg mqtt.Message) { | |
fmt.Println("[MQ] Received battery message") | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment