Documentation ¶
Overview ¶
Package runtime 应用实例相关操作
Index ¶
- type DeployContext
- type Option
- type Runtime
- func (r *Runtime) Create(operator user.ID, req *apistructs.RuntimeCreateRequest) (*apistructs.DeploymentCreateResponseDTO, error)
- func (r *Runtime) CreateByReleaseID(operator user.ID, releaseReq *apistructs.RuntimeReleaseCreateRequest) (*apistructs.DeploymentCreateResponseDTO, error)
- func (r *Runtime) CreateByReleaseIDPipeline(orgid uint64, operator user.ID, ...) (apistructs.RuntimeReleaseCreatePipelineResponse, error)
- func (r *Runtime) Delete(operator user.ID, orgID uint64, runtimeID uint64) (*apistructs.RuntimeDTO, error)
- func (r *Runtime) Destroy(runtimeID uint64) error
- func (r *Runtime) FullGC()
- func (r *Runtime) Get(userID user.ID, orgID uint64, idOrName string, appID string, workspace string) (*apistructs.RuntimeInspectDTO, error)
- func (r *Runtime) GetSpec(userID user.ID, orgID uint64, runtimeID uint64) (*apistructs.ServiceGroup, error)
- func (r *Runtime) KillPod(runtimeID uint64, podname string) error
- func (r *Runtime) List(userID user.ID, orgID uint64, appID uint64, workspace, name string) ([]apistructs.RuntimeSummaryDTO, error)
- func (r *Runtime) MarkOutdatedForDelete(runtimeID uint64)
- func (r *Runtime) OrgJobLogs(userID user.ID, orgID uint64, jobID, clusterName string, ...) (*apistructs.DashboardSpotLogData, error)
- func (r *Runtime) Redeploy(operator user.ID, orgID uint64, runtimeID uint64) (*apistructs.DeploymentCreateResponseDTO, error)
- func (r *Runtime) RedeployPipeline(operator user.ID, orgID uint64, runtimeID uint64) (*apistructs.DeploymentCreateResponsePipelineDTO, error)
- func (r *Runtime) ReferCluster(clusterName string) bool
- func (r *Runtime) Rollback(operator user.ID, orgID uint64, runtimeID uint64, deploymentID uint64) (*apistructs.DeploymentCreateResponseDTO, error)
- func (r *Runtime) RollbackPipeline(operator user.ID, orgID uint64, runtimeID uint64, deploymentID uint64) (*apistructs.DeploymentCreateResponsePipelineDTO, error)
- func (r *Runtime) RuntimeDeployLogs(userID user.ID, orgID uint64, deploymentID uint64, paramValues url.Values) (*apistructs.DashboardSpotLogData, error)
- func (r *Runtime) StopRuntime(operator user.ID, orgID uint64, runtimeID uint64) (*apistructs.DeploymentCreateResponseDTO, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeployContext ¶
type DeployContext struct { Runtime *dbclient.Runtime App *apistructs.ApplicationDTO LastDeployment *dbclient.Deployment // ReleaseId to deploy ReleaseID string Operator string DeployType string // Extras: // used for pipeline BuildID uint64 // used for ability AddonActions map[string]interface{} // used for runtime-addon InstanceID string // used for Scale0 bool // 不由 orchestrator 来推进部署 SkipPushByOrch bool }
DeployContext 部署上下文
type Option ¶
type Option func(*Runtime)
Option 应用实例对象配置选项
func WithEventManager ¶
func WithEventManager(evMgr *events.EventManager) Option
WithEventManager 配置 EventManager
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime 应用实例对象封装
func (*Runtime) Create ¶
func (r *Runtime) Create(operator user.ID, req *apistructs.RuntimeCreateRequest) ( *apistructs.DeploymentCreateResponseDTO, error)
Create 创建应用实例
func (*Runtime) CreateByReleaseID ¶
func (r *Runtime) CreateByReleaseID(operator user.ID, releaseReq *apistructs.RuntimeReleaseCreateRequest) (*apistructs.DeploymentCreateResponseDTO, error)
Create 创建应用实例
func (*Runtime) CreateByReleaseIDPipeline ¶
func (r *Runtime) CreateByReleaseIDPipeline(orgid uint64, operator user.ID, releaseReq *apistructs.RuntimeReleaseCreateRequest) (apistructs.RuntimeReleaseCreatePipelineResponse, error)
func (*Runtime) Delete ¶
func (r *Runtime) Delete(operator user.ID, orgID uint64, runtimeID uint64) (*apistructs.RuntimeDTO, error)
Delete 标记应用实例删除
func (*Runtime) Get ¶
func (r *Runtime) Get(userID user.ID, orgID uint64, idOrName string, appID string, workspace string) (*apistructs.RuntimeInspectDTO, error)
Get 查询应用实例
func (*Runtime) GetSpec ¶
func (r *Runtime) GetSpec(userID user.ID, orgID uint64, runtimeID uint64) (*apistructs.ServiceGroup, error)
GetSpec 查询应用实例规格
func (*Runtime) List ¶
func (r *Runtime) List(userID user.ID, orgID uint64, appID uint64, workspace, name string) ([]apistructs.RuntimeSummaryDTO, error)
List 查询应用实例列表
func (*Runtime) MarkOutdatedForDelete ¶
MarkOutdatedForDelete 将删除的应用实例,他们的所有部署单,标记为废弃
func (*Runtime) OrgJobLogs ¶
func (r *Runtime) OrgJobLogs(userID user.ID, orgID uint64, jobID, clusterName string, paramValues url.Values) (*apistructs.DashboardSpotLogData, error)
OrgJobLogs 数据中心--->任务列表 日志接口
func (*Runtime) Redeploy ¶
func (r *Runtime) Redeploy(operator user.ID, orgID uint64, runtimeID uint64) (*apistructs.DeploymentCreateResponseDTO, error)
Redeploy 重新部署
func (*Runtime) RedeployPipeline ¶
func (r *Runtime) RedeployPipeline(operator user.ID, orgID uint64, runtimeID uint64) (*apistructs.DeploymentCreateResponsePipelineDTO, error)
func (*Runtime) ReferCluster ¶
ReferCluster 查看 runtime & addon 是否有使用集群
func (*Runtime) Rollback ¶
func (r *Runtime) Rollback(operator user.ID, orgID uint64, runtimeID uint64, deploymentID uint64) ( *apistructs.DeploymentCreateResponseDTO, error)
func (*Runtime) RollbackPipeline ¶
func (r *Runtime) RollbackPipeline(operator user.ID, orgID uint64, runtimeID uint64, deploymentID uint64) ( *apistructs.DeploymentCreateResponsePipelineDTO, error)
func (*Runtime) RuntimeDeployLogs ¶
func (r *Runtime) RuntimeDeployLogs(userID user.ID, orgID uint64, deploymentID uint64, paramValues url.Values) (*apistructs.DashboardSpotLogData, error)
RuntimeDeployLogs deploy发布日志接口
func (*Runtime) StopRuntime ¶
func (r *Runtime) StopRuntime(operator user.ID, orgID uint64, runtimeID uint64) (*apistructs.DeploymentCreateResponseDTO, error)
StopRuntime scale 0 服务
Click to show internal directories.
Click to hide internal directories.