Documentation ¶
Index ¶
- func StrategyIsValid(strategy []string, serviceDeployType string) bool
- type ApplyPluginConfigTaskBody
- type ApplyRuleTaskBody
- type DefaultTaskBody
- type DeleteTenantTaskBody
- type Dependence
- type GroupStartTaskBody
- type GroupStopTaskBody
- type HorizontalScalingTaskBody
- type RefreshHPATaskBody
- type RestartTaskBody
- type RollBackTaskBody
- type RollingUpgradeTaskBody
- type ServiceGCTaskBody
- type StartTaskBody
- type StopTaskBody
- type Task
- type TaskBody
- type TaskType
- type VerticalScalingTaskBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StrategyIsValid ¶
StrategyIsValid 验证策略是否有效 策略包括以下值: prestart 先启动后关闭 prestop 先关闭后启动 rollingupdate 滚动形式 grayupdate 灰度形式 bluegreenupdate 蓝绿形式
Types ¶
type ApplyPluginConfigTaskBody ¶
type ApplyPluginConfigTaskBody struct { ServiceID string `json:"service_id"` PluginID string `json:"plugin_id"` EventID string `json:"event_id"` //Action put delete Action string `json:"action"` }
ApplyPluginConfigTaskBody apply plugin dynamic discover config
type ApplyRuleTaskBody ¶
type ApplyRuleTaskBody struct { ServiceID string `json:"service_id"` EventID string `json:"event_id"` ServiceKind string `json:"service_kind"` Action string `json:"action"` Port int `json:"port"` IsInner bool `json:"is_inner"` Limit map[string]string `json:"limit"` }
ApplyRuleTaskBody contains information for ApplyRuleTask
type DeleteTenantTaskBody ¶
type DeleteTenantTaskBody struct {
TenantID string `json:"tenant_id"`
}
DeleteTenantTaskBody -
type Dependence ¶
type Dependence struct { CurrentServiceID string `json:"current_service_id"` DependServiceID string `json:"depend_service_id"` }
Dependence 依赖关系
type GroupStartTaskBody ¶
type GroupStartTaskBody struct { Services []StartTaskBody `json:"services"` Dependences []Dependence `json:"dependences"` //组启动策略 //顺序启动,无序并发启动 Strategy []string `json:"strategy"` }
GroupStartTaskBody 组应用启动操作任务主体
type GroupStopTaskBody ¶
type GroupStopTaskBody struct { Services []StartTaskBody `json:"services"` Dependences []Dependence `json:"dependences"` //组关闭策略 //顺序关系,无序并发关闭 Strategy []string `json:"strategy"` }
GroupStopTaskBody 组应用停止操作任务主体
type HorizontalScalingTaskBody ¶
type HorizontalScalingTaskBody struct { TenantID string `json:"tenant_id"` ServiceID string `json:"service_id"` Replicas int32 `json:"replicas"` EventID string `json:"event_id"` Username string `json:"username"` }
HorizontalScalingTaskBody 水平伸缩操作任务主体
type RefreshHPATaskBody ¶
type RefreshHPATaskBody struct { ServiceID string `json:"service_id"` RuleID string `json:"rule_id"` EventID string `json:"eventID"` }
RefreshHPATaskBody -
type RestartTaskBody ¶
type RestartTaskBody struct { TenantID string `json:"tenant_id"` ServiceID string `json:"service_id"` DeployVersion string `json:"deploy_version"` EventID string `json:"event_id"` //重启策略,此策略不保证生效 //例如应用如果为有状态服务,此策略如配置为先启动后关闭,此策略不生效 //无状态服务默认使用先启动后关闭,保证服务不受影响 Strategy []string `json:"strategy"` Configs map[string]string `json:"configs"` }
RestartTaskBody 重启操作任务主体
type RollBackTaskBody ¶
type RollBackTaskBody struct { TenantID string `json:"tenant_id"` ServiceID string `json:"service_id"` //当前版本 CurrentDeployVersion string `json:"current_deploy_version"` //回滚目标版本 OldDeployVersion string `json:"old_deploy_version"` EventID string `json:"event_id"` //重启策略,此策略不保证生效 //例如应用如果为有状态服务,此策略如配置为先启动后关闭,此策略不生效 //无状态服务默认使用先启动后关闭,保证服务不受影响 //如需使用滚动升级等策略,使用多策略方式 Strategy []string `json:"strategy"` }
RollBackTaskBody 回滚操作任务主体
type RollingUpgradeTaskBody ¶
type RollingUpgradeTaskBody struct { TenantID string `json:"tenant_id"` ServiceID string `json:"service_id"` NewDeployVersion string `json:"deploy_version"` EventID string `json:"event_id"` Strategy []string `json:"strategy"` Configs map[string]string `json:"configs"` }
RollingUpgradeTaskBody 升级操作任务主体
type ServiceGCTaskBody ¶
type ServiceGCTaskBody struct { TenantID string `json:"tenant_id"` ServiceID string `json:"service_id"` EventIDs []string `json:"event_ids"` }
ServiceGCTaskBody holds the request body to execute service gc task.
type StartTaskBody ¶
type StartTaskBody struct { TenantID string `json:"tenant_id"` ServiceID string `json:"service_id"` DeployVersion string `json:"deploy_version"` EventID string `json:"event_id"` Configs map[string]string `json:"configs"` // When determining the startup sequence of services, you need to know the services they depend on DepServiceIDInBootSeq []string `json:"dep_service_ids_in_boot_seq"` }
StartTaskBody 启动操作任务主体
type StopTaskBody ¶
type StopTaskBody struct { TenantID string `json:"tenant_id"` ServiceID string `json:"service_id"` DeployVersion string `json:"deploy_version"` EventID string `json:"event_id"` Configs map[string]string `json:"configs"` }
StopTaskBody 停止操作任务主体
type Task ¶
type Task struct { Type TaskType `json:"type"` Body TaskBody `json:"body"` CreateTime time.Time `json:"time,omitempty"` User string `json:"user"` }
Task 任务
type TaskBody ¶
type TaskBody interface{}
TaskBody task body
func NewTaskBody ¶
NewTaskBody new task body
type VerticalScalingTaskBody ¶
type VerticalScalingTaskBody struct { TenantID string `json:"tenant_id"` ServiceID string `json:"service_id"` ContainerCPU *int `json:"container_cpu"` ContainerMemory *int `json:"container_memory"` ContainerGPU *int `json:"container_gpu"` EventID string `json:"event_id"` }
VerticalScalingTaskBody 垂直伸缩操作任务主体