Phase8
Some checks failed
CI / Node — lint, typecheck, test, build (push) Failing after 9s
CI / Go — node-agent tests (push) Failing after 9s
CI / Go — edge-gateway build (push) Successful in 17s

This commit is contained in:
smueller
2026-06-26 13:33:03 +02:00
parent ab21f53cdd
commit b335f6a497
39 changed files with 1477 additions and 20 deletions

View File

@@ -1,8 +1,14 @@
package main
import (
"context"
"log/slog"
"os"
"os/signal"
"syscall"
"github.com/hexahost/gamecloud/edge-gateway/internal/config"
"github.com/hexahost/gamecloud/edge-gateway/internal/proxy"
)
func main() {
@@ -12,18 +18,21 @@ func main() {
enabled := os.Getenv("EDGE_GATEWAY_ENABLED")
if enabled != "true" && enabled != "1" {
log.Info("edge gateway disabled for MVP",
log.Info("edge gateway disabled",
"feature", "edge-gateway",
"status", "not_implemented",
"message", "Join-to-Start TCP/UDP gateway is planned for Phase 8; set EDGE_GATEWAY_ENABLED=true to acknowledge early enablement",
"hint", "set EDGE_GATEWAY_ENABLED=true to start the TCP join-to-start gateway",
)
os.Exit(0)
return
}
log.Info("edge gateway not implemented in MVP",
"feature", "edge-gateway",
"status", "not_implemented",
"roadmap", "Phase 8 DNS and Join-to-Start",
)
os.Exit(0)
cfg := config.Load()
gateway := proxy.New(cfg, log)
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
if err := gateway.ListenAndServe(ctx); err != nil {
log.Error("edge gateway stopped", "error", err)
os.Exit(1)
}
}