feat: support customizing timeout for specific route (#1203)

* feat: support customizing timeout for specific route

* test: add more tests
This commit is contained in:
Kevin Wan
2021-11-03 22:20:32 +08:00
committed by GitHub
parent 01786c5e63
commit 3ede597a15
5 changed files with 65 additions and 2 deletions

View File

@@ -1,6 +1,9 @@
package rest
import "net/http"
import (
"net/http"
"time"
)
type (
// Middleware defines the middleware method.
@@ -28,6 +31,7 @@ type (
}
featuredRoutes struct {
timeout time.Duration
priority bool
jwt jwtSetting
signature signatureSetting