mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
40 lines
583 B
Go
40 lines
583 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)
|
|
Ready() (ok bool)
|
|
}
|
|
|
|
type NodeApp interface {
|
|
App
|
|
interfaces.WithConfigPath
|
|
}
|
|
|
|
type ServerApp interface {
|
|
NodeApp
|
|
GetApi() (api ApiApp)
|
|
GetNodeService() (masterSvc interfaces.NodeService)
|
|
}
|
|
|
|
type DockerApp interface {
|
|
App
|
|
GetParent() (parent NodeApp)
|
|
SetParent(parent NodeApp)
|
|
Ready() (ok bool)
|
|
}
|