updated code structure

This commit is contained in:
marvzhang
2021-04-29 10:44:46 +08:00
parent 820334753a
commit fd0f6fc37a
12 changed files with 192 additions and 80 deletions

View File

@@ -2,21 +2,24 @@ package apps
import (
"github.com/apex/log"
"github.com/crawlab-team/crawlab-core/services"
"github.com/crawlab-team/crawlab-core/grpc"
)
type Handler struct {
BaseApp
}
func (app *Handler) init() {
_ = app.initModule("task-service", services.InitTaskService)
func (app *Handler) Init() {
_ = initModule("grpc", grpc.InitGrpcServices)
}
func (app *Handler) run() {
func (app *Handler) Run() {
log.Info("handler has started")
}
func (app *Handler) Stop() {
log.Info("handler has stopped")
}
func NewHandler() *Handler {
return &Handler{}
}