feat: integrate 8.2 X-Service dispatcher into main router
This commit is contained in:
+8
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user