chore(SimpleRouter)!: promoted from unstable

This commit is contained in:
2026-03-09 20:31:43 +01:00
parent 5acd5e01eb
commit d2f2558fdf
3 changed files with 0 additions and 0 deletions

21
simplerouter/types.go Normal file
View File

@@ -0,0 +1,21 @@
package SimpleRouter
import (
"net/http"
"time"
)
type Middleware func(http.Handler) http.Handler
type RouteGroup struct {
mux *http.ServeMux // A ponter to the underlying ServeMux, this allows us to call ListenAndServe on any instance
basePath string // The current path we are defining handlers on / appending to
middlewares []Middleware // Stack of middlewares that will be applied on a handler in order
global_middlewares *[]Middleware
}
type ServerConfig struct {
ReadTimeout time.Duration
ReadHeaderTimeout time.Duration
WriteTimeout time.Duration
}