feat: add authenticated matchmaking event stream

This commit is contained in:
Josh Creek
2026-08-31 23:05:04 +01:00
parent d77563147c
commit d258f17852
4 changed files with 378 additions and 2 deletions
+4
View File
@@ -72,6 +72,8 @@ type Service struct {
RankedProfiles map[string]domain.RankedProfile
TierPolicy domain.TierPolicy
proposalMu sync.Mutex
eventsMu sync.Mutex
events *eventHub
}
func (s *Service) Handler() http.Handler {
@@ -84,6 +86,7 @@ func (s *Service) Handler() http.Handler {
mux.HandleFunc("/v1/assignments/", s.assignment)
mux.HandleFunc("/v1/profile/ranked", s.rankedProfile)
mux.HandleFunc("/v1/probes/", s.probe)
mux.HandleFunc("/v1/events", s.controlPlaneEvent)
// The public contract is served below /api/v1. Keep the original /v1
// routes for the Godot client while exposing the documented names.
mux.HandleFunc("/api/v1/session/steam", s.steamSession)
@@ -92,6 +95,7 @@ func (s *Service) Handler() http.Handler {
mux.HandleFunc("/api/v1/queue/tickets/", s.contractQueueMutation)
mux.HandleFunc("/api/v1/proposals/", s.contractProposalMutation)
mux.HandleFunc("/api/v1/assignments/", s.contractAssignment)
mux.HandleFunc("/api/v1/events", s.controlPlaneEvent)
return mux
}