Documentation
¶
Index ¶
Constants ¶
View Source
const ( ANNOTATION_CLUSTER_ID = "cluster_id" ANNOTATION_DEPLOY_ID = "deploy_id" )
View Source
const (
APP_NAME = "deploy"
)
View Source
const (
DEPLOY_LABEL_KEY = "deploy_id"
)
Variables ¶
This section is empty.
Functions ¶
func RegisterRunner ¶
Types ¶
type DeployRecord ¶
type DeployRecord struct { // 部署记录Id Id string `json:"id" bson:"_id" gorm:"column:id;primaryKey"` // 部署记录创建时间 CreateAt time.Time `json:"create_at" bson:"create_at" gorm:"column:create_at"` // 部署任务的参数 DeployRequest // 部署任务的状态, 通过查询任务平台获取 DeployTasks []*task.Task `json:"deploy_tasks" bson:"deploy_tasks" gorm:"-"` }
func NewDeployRecord ¶
func NewDeployRecord(req DeployRequest) *DeployRecord
func (*DeployRecord) AddDeployTask ¶
func (d *DeployRecord) AddDeployTask(tasks ...*task.Task) *DeployRecord
func (*DeployRecord) String ¶
func (d *DeployRecord) String() string
func (DeployRecord) TableName ¶
func (d DeployRecord) TableName() string
type DeployRequest ¶
type DeployRequest struct { // 服务部署集群Id, 维护有关联的服务,部署配置也在这里 ClusterId string `json:"cluster_id"` // 该部署集群, 需要部署哪个制品(包) ArtifcatId string `json:"artifcat_id"` }
func NewDeployRequest ¶
func NewDeployRequest() *DeployRequest
func (*DeployRequest) String ¶
func (d *DeployRequest) String() string
type DescribeDeployRecordRequest ¶
type DescribeDeployRecordRequest struct {
Id string `json:"id" bson:"_id"`
}
func NewDescribeDeployRecordRequest ¶
func NewDescribeDeployRecordRequest(id string) *DescribeDeployRecordRequest
type QueryDeployRecordRequest ¶
type QueryDeployRecordRequest struct { policy.ResourceScope *request.PageRequest }
func NewQueryDeployRecordRequest ¶
func NewQueryDeployRecordRequest() *QueryDeployRecordRequest
type Runner ¶
type Runner interface { // 执行部署 RunDeploy(ctx context.Context, req *DeployRequest) (*DeployRecord, error) }
type Service ¶
type Service interface { // 服务部署 Deploy(context.Context, *DeployRequest) (*DeployRecord, error) // 查询部署记录 QueryDeployRecord(context.Context, *QueryDeployRecordRequest) (*types.Set[*DeployRecord], error) // 查询部署详情 DescribeDeployRecord(context.Context, *DescribeDeployRecordRequest) (*DeployRecord, error) }
func GetService ¶
func GetService() Service
Click to show internal directories.
Click to hide internal directories.