Implement orchestrator to handle the alerting

This commit is contained in:
2025-10-10 23:16:52 +02:00
parent 83c49f96e4
commit b36db1ea2a
2 changed files with 226 additions and 1 deletions

View File

@@ -17,7 +17,7 @@ import (
"github.com/valyala/fasthttp"
)
var webhook wh.Webhook
var webhook *wh.ZulipWebhook
func main() {
// Add flag for generating .env.example
@@ -72,6 +72,10 @@ func main() {
routeHandler := routes.NewRouteHandler(sso, webhook, cachedESI)
routeHandler.SetupRoutes(r)
// Create and start orchestrator
orchestrator := NewOrchestrator(cachedESI, sso, database, webhook)
orchestrator.Start()
logger.Info("Starting web server on 0.0.0.0:%s", options.GlobalOptions.Port)
go func() {
if err := fasthttp.ListenAndServe("0.0.0.0:"+options.GlobalOptions.Port, r.Handler); err != nil {