Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelResp ¶
type CancelResp struct{}
func Cancel ¶
func Cancel(ctx *cloudplatform.Context, req *CancelReq) (*CancelResp, error)
Cancel 取消任务
type DetailResp ¶
type DetailResp struct {
Id int `json:"id"`
Data []interface{} `json:"data"`
Type string `json:"type"`
Hostid int `json:"hostid"`
Status int `json:"status"`
CreateTime string `json:"create_time"`
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
Progress int `json:"progress"`
Msg string `json:"msg"`
UserType int `json:"user_type"`
Uid int `json:"uid"`
Ip string `json:"ip"`
TypeDesc string `json:"type_desc"`
}
func Detail ¶
func Detail(ctx *cloudplatform.Context, req *DetailReq) (*DetailResp, error)
Detail 任务详情
type ListReq ¶
type ListReq struct {
Status string `url:"status,omitempty"` // 状态(0未开始,1正在执行,2执行成功,3执行失败,4强制结束,5已取消)
Cloud string `url:"cloud,omitempty"` // 实例ID(传入ID获取某个实例的任务列表)
RelType string `url:"rel_type,omitempty"` // 任务关联类型(cloud=实例,load_balance=负载均衡)
Page string `url:"page,omitempty"`
PerPage string `url:"per_page,omitempty"`
Orderby string `url:"orderby,omitempty"` // 排序(id,status,start_time,end_time,progress)
Sort string `url:"sort,omitempty"`
}
type ListResp ¶
type ListResp struct {
Data []struct {
Id int `json:"id"`
Type string `json:"type"`
Status int `json:"status"`
CreateTime string `json:"create_time"`
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
Progress int `json:"progress"`
Msg string `json:"msg"`
RelType string `json:"rel_type"`
Hostid int `json:"hostid"`
Hostname string `json:"hostname"`
} `json:"data"`
Meta struct {
Total int `json:"total"`
TotalPage int `json:"total_page"`
Page int `json:"page"`
PerPage int `json:"per_page"`
} `json:"meta"`
}
Click to show internal directories.
Click to hide internal directories.