- Implemented notification event publishing with a new NotificationEventPublisher interface. - Created a noopNotificationEventPublisher for testing purposes. - Added functionality to publish notification created events via MQTT. - Introduced a new stream event publisher for handling job logs and updates. - Added database migration for popup_ads table. - Created tests for notification events and popup ads functionality. - Established MQTT connection and publishing helpers for event messages.
15 lines
265 B
Go
15 lines
265 B
Go
package mqtt
|
|
|
|
import "time"
|
|
|
|
const (
|
|
defaultMQTTBrokerURL = "tcp://broker.mqtt-dashboard.com:1883"
|
|
defaultMQTTPrefix = "picpic"
|
|
defaultPublishWait = 5 * time.Second
|
|
)
|
|
|
|
type mqttEvent struct {
|
|
Type string `json:"type"`
|
|
Payload any `json:"payload"`
|
|
}
|