|
@@ -19,9 +19,14 @@ type ServerConfig struct {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
type MQTTServer struct {
|
|
type MQTTServer struct {
|
|
|
- Enable bool `json:"enable"`
|
|
|
|
|
- Name string `json:"name"`
|
|
|
|
|
- Protocol string `json:"protocol"`
|
|
|
|
|
|
|
+ Enable bool `json:"enable"`
|
|
|
|
|
+ Name string `json:"name"`
|
|
|
|
|
+ Protocol string `json:"protocol"`
|
|
|
|
|
+
|
|
|
|
|
+ EnableOfflineStorage bool `json:"enableOfflineStorage"`
|
|
|
|
|
+ DataRetentionDays int `json:"dataRetentionDays"`
|
|
|
|
|
+ ImagRetentionDays int `json:"imagRetentionDays"`
|
|
|
|
|
+
|
|
|
BrokerAddress string `json:"brokerAddress"`
|
|
BrokerAddress string `json:"brokerAddress"`
|
|
|
Username string `json:"username"`
|
|
Username string `json:"username"`
|
|
|
Password string `json:"password"`
|
|
Password string `json:"password"`
|
|
@@ -58,6 +63,9 @@ const defaultConfig = `{
|
|
|
"enable": true,
|
|
"enable": true,
|
|
|
"name": "yfkj's mqtt server",
|
|
"name": "yfkj's mqtt server",
|
|
|
"protocol": "yfkj-private",
|
|
"protocol": "yfkj-private",
|
|
|
|
|
+ "enableOfflineStorage": "true",
|
|
|
|
|
+ "dataRetentionDays": 0,
|
|
|
|
|
+ "imagRetentionDays": 0,
|
|
|
"brokerAddress": "tcp://8.136.98.49:61883",
|
|
"brokerAddress": "tcp://8.136.98.49:61883",
|
|
|
"username": "user",
|
|
"username": "user",
|
|
|
"password": "f335bf402c655ee5fd2b5300905124e",
|
|
"password": "f335bf402c655ee5fd2b5300905124e",
|