fix: gateway conf doesn't work (#2968)
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package gateway
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest"
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
)
|
||||
@@ -12,7 +10,6 @@ type (
|
||||
GatewayConf struct {
|
||||
rest.RestConf
|
||||
Upstreams []Upstream
|
||||
Timeout time.Duration `json:",default=5s"`
|
||||
}
|
||||
|
||||
// RouteMapping is a mapping between a gateway route and an upstream rpc method.
|
||||
|
||||
@@ -38,7 +38,6 @@ func MustNewServer(c GatewayConf, opts ...Option) *Server {
|
||||
svr := &Server{
|
||||
Server: rest.MustNewServer(c.RestConf),
|
||||
upstreams: c.Upstreams,
|
||||
timeout: c.Timeout,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(svr)
|
||||
|
||||
Reference in New Issue
Block a user