Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support virtual machines #1782

Merged
merged 3 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/api/api_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ type TenantInterfaceWithV1 interface {
VerticalService(w http.ResponseWriter, r *http.Request)
HorizontalService(w http.ResponseWriter, r *http.Request)
BuildService(w http.ResponseWriter, r *http.Request)
PauseService(w http.ResponseWriter, r *http.Request)
UNPauseService(w http.ResponseWriter, r *http.Request)
DeployService(w http.ResponseWriter, r *http.Request)
UpgradeService(w http.ResponseWriter, r *http.Request)
StatusService(w http.ResponseWriter, r *http.Request)
Expand Down
2 changes: 2 additions & 0 deletions api/api_routers/version2/v2Routers.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ func (v2 *V2) serviceRouter() chi.Router {
// component build
r.Post("/build", middleware.WrapEL(controller.GetManager().BuildService, dbmodel.TargetTypeService, "build-service", dbmodel.ASYNEVENTTYPE))
// component start
r.Post("/pause", middleware.WrapEL(controller.GetManager().PauseService, dbmodel.TargetTypeService, "pause-service", dbmodel.ASYNEVENTTYPE))
r.Post("/un_pause", middleware.WrapEL(controller.GetManager().UNPauseService, dbmodel.TargetTypeService, "unpause-service", dbmodel.ASYNEVENTTYPE))
r.Post("/start", middleware.WrapEL(controller.GetManager().StartService, dbmodel.TargetTypeService, "start-service", dbmodel.ASYNEVENTTYPE))
// component stop event set to synchronous event, not wait.
r.Post("/stop", middleware.WrapEL(controller.GetManager().StopService, dbmodel.TargetTypeService, "stop-service", dbmodel.SYNEVENTTYPE))
Expand Down
8 changes: 4 additions & 4 deletions api/api_routers/websocket/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/go-chi/chi"
)

//Routes routes
// Routes routes
func Routes() chi.Router {
r := chi.NewRouter()
r.Get("/docker_console", controller.GetDockerConsole().Get)
Expand All @@ -36,15 +36,15 @@ func Routes() chi.Router {
return r
}

//LogRoutes 日志下载路由
// LogRoutes 日志下载路由
func LogRoutes() chi.Router {
r := chi.NewRouter()
r.Get("/{gid}/{filename}", controller.GetLogFile().Get)
r.Get("/install_log/{filename}", controller.GetLogFile().GetInstallLog)
return r
}

//AppRoutes 应用导出包下载路由
// AppRoutes 应用导出包下载路由
func AppRoutes() chi.Router {
r := chi.NewRouter()
r.Get("/download/{format}/{fileName}", controller.GetManager().Download)
Expand All @@ -53,7 +53,7 @@ func AppRoutes() chi.Router {
return r
}

//PackageBuildRoutes 本地文件上传路由
// PackageBuildRoutes 本地文件上传路由
func PackageBuildRoutes() chi.Router {
r := chi.NewRouter()
r.Post("/component/events/{eventID}", controller.GetManager().UploadPackage)
Expand Down
Loading
Loading