Skip to content

Instantly share code, notes, and snippets.

@BK1031
Created July 9, 2024 21:06
Show Gist options
  • Save BK1031/5c5888337b39a85e3205c70c76debc1f to your computer and use it in GitHub Desktop.
Save BK1031/5c5888337b39a85e3205c70c76debc1f to your computer and use it in GitHub Desktop.
racecar_analytics mqtt subscription functions
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