initial commit

This commit is contained in:
2022-12-16 23:27:24 +01:00
commit 60487a79db
13 changed files with 550 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
package MqttService
type MqttServiceConfig struct {
BrokerAddress string `yaml:"broker-address"`
TopicPrefix string `yaml:"topic-prefix"`
AutoReconnect bool `yaml:"auto-reconnect"`
ConnectTimeoutMs int `yaml:"connect-timeout-ms"`
Username string `yaml:"username"`
Password string `yaml:"password"`
}
func NewMqttServiceConfig() MqttServiceConfig {
return MqttServiceConfig{
BrokerAddress: "tcp://localhost:1883",
TopicPrefix: "/rpicontrol",
AutoReconnect: true,
ConnectTimeoutMs: 10000,
}
}