diff --git a/core/apps/interfaces.go b/core/apps/interfaces.go index 51530bef..42fc1a99 100644 --- a/core/apps/interfaces.go +++ b/core/apps/interfaces.go @@ -1,26 +1,8 @@ package apps -import ( - "github.com/crawlab-team/crawlab/core/interfaces" - "github.com/gin-gonic/gin" - "net/http" -) - type App interface { Init() Start() Wait() Stop() } - -type ApiApp interface { - App - GetGinEngine() (engine *gin.Engine) - GetHttpServer() (svr *http.Server) -} - -type ServerApp interface { - App - GetApi() (api ApiApp) - GetNodeService() (masterSvc interfaces.NodeService) -} diff --git a/core/apps/server.go b/core/apps/server.go index c23441bb..3724ebec 100644 --- a/core/apps/server.go +++ b/core/apps/server.go @@ -46,7 +46,7 @@ func (app *Server) Stop() { app.api.Stop() } -func (app *Server) GetApi() ApiApp { +func (app *Server) GetApi() *Api { return app.api } diff --git a/core/utils/config.go b/core/utils/config.go index d7556a44..5cb03095 100644 --- a/core/utils/config.go +++ b/core/utils/config.go @@ -73,11 +73,7 @@ func GetGinMode() string { if res := viper.GetString("gin.mode"); res != "" { return res } - if IsDev() { - return gin.DebugMode - } else { - return gin.ReleaseMode - } + return gin.ReleaseMode } func IsPro() bool {