mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-29 18:00:51 +01:00
updated code structure
This commit is contained in:
@@ -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{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user