Files
crawlab/core/apps/interfaces.go
2024-11-18 16:48:09 +08:00

27 lines
389 B
Go

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)
}