Files

31 lines
818 B
Go
Raw Permalink Normal View History

2021-09-14 19:25:37 +02:00
package main
import (
"log"
2021-09-27 10:23:31 +02:00
appConfig "bitbucket.org/outfrontmedia/rolling-stock-display-simulation-tool/config"
xmppService "bitbucket.org/outfrontmedia/rolling-stock-display-simulation-tool/services"
2021-09-14 19:25:37 +02:00
)
func main() {
// LOAD APPLICATION CONFIGURATION
appConfig.Load()
// Initialise XMPP service
xmppService.Init()
// Send online presence stanza
xmppServiceInstance := xmppService.Instance()
// Execute send online presence status message for every client and termintate program
if appConfig.AppConfig.GeneralOptions.ExecuteSingleStatusMessage {
xmppServiceInstance.ExecuteSingleStatusMessage()
log.Println("ExecuteSingleStatusMessage finished, online presente status message sent sucessfuly")
return
}
// Keep the servbie running
xmppServiceInstance.RunOnlinePresenceStatusIndefinetly()
2021-09-14 19:25:37 +02:00
}