Phase8
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user