feat: integrate 8.2 X-Service dispatcher into main router
Build and push / Build and push image (push) Successful in 55s
Build / Build and push image (push) Successful in 41s
CI / Test, vet, build (push) Failing after 45s

This commit is contained in:
Admin Bot
2026-08-26 14:05:43 -07:00
parent 951a4399d6
commit 0cdfae2a93
2 changed files with 45 additions and 15 deletions
+8 -2
View File
@@ -12,6 +12,7 @@ import (
"forgejo.riotpiao.com/rock/homelab-frontend/internal/config"
"forgejo.riotpiao.com/rock/homelab-frontend/internal/proxy"
"forgejo.riotpiao.com/rock/homelab-frontend/internal/server"
"forgejo.riotpiao.com/rock/homelab-frontend/internal/serviceadapter"
"forgejo.riotpiao.com/rock/homelab-frontend/internal/temporal"
)
@@ -51,8 +52,13 @@ func main() {
healthChecker := server.NewHealthChecker(true, authEnabled)
srv.SetHealthChecker(healthChecker)
// Create router that handles health endpoints, temporal endpoints, and passes others to upstream
router := server.NewRouter(healthChecker, temporalHandler, upstreamHandler)
// Create ServiceAdapter registry and dispatcher (phase 8)
registry := serviceadapter.NewRegistry(nil) // nil uses default logger
dispatcher := serviceadapter.NewDispatcher(registry)
// Create router that handles health endpoints, X-Service (ServiceAdapter) routing,
// temporal endpoints, and passes others to upstream handler
router := server.NewRouter(healthChecker, dispatcher, temporalHandler, upstreamHandler)
srv.SetHandler(router)
// Set up signal handling