go-api/websocket.go
Snider 22f8a6915c feat: add WebSocket endpoint and channel listing from StreamGroups
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 15:53:10 +00:00

17 lines
396 B
Go

// SPDX-License-Identifier: EUPL-1.2
package api
import (
"net/http"
"github.com/gin-gonic/gin"
)
// wrapWSHandler adapts a standard http.Handler to a Gin handler for the /ws route.
// The underlying handler is responsible for upgrading the connection to WebSocket.
func wrapWSHandler(h http.Handler) gin.HandlerFunc {
return func(c *gin.Context) {
h.ServeHTTP(c.Writer, c.Request)
}
}