feat: add optional http server config params
This commit was merged in pull request #11.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package SimpleRouter
|
||||
|
||||
import "net/http"
|
||||
import (
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Middleware func(http.Handler) http.Handler
|
||||
|
||||
@@ -10,3 +13,9 @@ type RouteGroup struct {
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user