Implement orchestrator to handle the alerting
This commit is contained in:
6
main.go
6
main.go
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user