rename ngin to rest

This commit is contained in:
kevin
2020-07-31 11:45:16 +08:00
parent 0897f60c5d
commit f372ded63c
25 changed files with 112 additions and 119 deletions

View File

@@ -15,7 +15,7 @@ import (
func main() {
logx.Disable()
stat.SetReporter(nil)
server := rest.MustNewEngine(rest.RtConf{
server := rest.MustNewServer(rest.RestConf{
ServiceConf: service.ServiceConf{
Name: "breaker",
Log: logx.LogConf{

View File

@@ -47,7 +47,7 @@ func handle(w http.ResponseWriter, r *http.Request) {
func main() {
flag.Parse()
engine := rest.MustNewEngine(rest.RtConf{
engine := rest.MustNewServer(rest.RestConf{
ServiceConf: service.ServiceConf{
Log: logx.LogConf{
Mode: "console",

View File

@@ -37,7 +37,7 @@ func handlePost(w http.ResponseWriter, r *http.Request) {
func main() {
flag.Parse()
engine := rest.MustNewEngine(rest.RtConf{
engine := rest.MustNewServer(rest.RestConf{
ServiceConf: service.ServiceConf{
Log: logx.LogConf{
Mode: "console",

View File

@@ -42,7 +42,7 @@ func main() {
flag.Parse()
logx.Disable()
engine := rest.MustNewEngine(rest.RtConf{
engine := rest.MustNewServer(rest.RestConf{
ServiceConf: service.ServiceConf{
Log: logx.LogConf{
Mode: "console",

View File

@@ -31,7 +31,7 @@ func handle(w http.ResponseWriter, r *http.Request) {
func main() {
flag.Parse()
engine := rest.MustNewEngine(rest.RtConf{
engine := rest.MustNewServer(rest.RestConf{
ServiceConf: service.ServiceConf{
Log: logx.LogConf{
Path: "logs",