fix: harden real backend workflows and channel connections

This commit is contained in:
hectorzhao
2026-07-06 17:54:53 +08:00
parent 8cca361441
commit b5132d7f4e
47 changed files with 2530 additions and 314 deletions
+8 -3
View File
@@ -5,6 +5,7 @@ import (
"net/http"
"os"
"cmpp-platform/gateway/internal/control"
"cmpp-platform/gateway/internal/health"
)
@@ -14,8 +15,12 @@ func main() {
addr = ":8090"
}
log.Printf("cmpp gateway health server listening on %s", addr)
if err := http.ListenAndServe(addr, health.Handler()); err != nil {
log.Fatalf("gateway health server stopped: %v", err)
mux := http.NewServeMux()
mux.Handle("/health", health.Handler())
control.Register(mux, control.Server{APIBaseURL: os.Getenv("API_BASE_URL")})
log.Printf("cmpp gateway control server listening on %s", addr)
if err := http.ListenAndServe(addr, mux); err != nil {
log.Fatalf("gateway control server stopped: %v", err)
}
}