creating sse broker

This commit is contained in:
2025-05-15 20:45:08 +02:00
parent 155e7a4116
commit ba604bb8b4
5 changed files with 183 additions and 3 deletions
+1 -3
View File
@@ -5,10 +5,8 @@ import (
"slices"
)
// Middleware is a function that wraps an http.Handler.
type Middleware func(http.Handler) http.Handler
// Router wraps http.ServeMux and provides grouping and middleware support.
type Router struct {
globalChain []Middleware
routeChain []Middleware
@@ -16,7 +14,7 @@ type Router struct {
*http.ServeMux
}
func NewRouter() *Router {
func newRouter() *Router {
return &Router{ServeMux: http.NewServeMux()}
}