Moved most config structs to be in the same file as what they are for

This commit is contained in:
2023-04-13 05:12:39 +02:00
parent 2aa13e7706
commit f4c1ac5c9b
16 changed files with 305 additions and 343 deletions

View File

@@ -19,6 +19,17 @@ pub trait OnMqtt {
pub type Receiver = broadcast::Receiver<Publish>;
type Sender = broadcast::Sender<Publish>;
#[derive(Debug, Clone, Deserialize)]
pub struct MqttConfig {
pub host: String,
pub port: u16,
pub client_name: String,
pub username: String,
pub password: String,
#[serde(default)]
pub tls: bool,
}
pub struct Mqtt {
tx: Sender,
eventloop: EventLoop,