rename ngin to rest
This commit is contained in:
@@ -6,6 +6,6 @@ import (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
rest.RtConf
|
||||
rest.RestConf
|
||||
Rpc rpcx.RpcClientConf
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ func main() {
|
||||
Client: client,
|
||||
}
|
||||
|
||||
engine := rest.MustNewEngine(c.RtConf)
|
||||
engine := rest.MustNewServer(c.RestConf)
|
||||
defer engine.Stop()
|
||||
|
||||
handler.RegisterHandlers(engine, ctx)
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"zero/rest"
|
||||
)
|
||||
|
||||
func RegisterHandlers(engine *rest.Engine, ctx *svc.ServiceContext) {
|
||||
func RegisterHandlers(engine *rest.Server, ctx *svc.ServiceContext) {
|
||||
engine.AddRoutes([]rest.Route{
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
|
||||
Reference in New Issue
Block a user