Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateCronTaskData ¶
type CreateCronTaskData struct {
Name string // 任务名称
Spec string // crontab 表达式
Command string // 执行命令
Protocol int64 // 执行方式 1:shell 2:http
HttpMethod int64 // http 请求方式 1:get 2:post
Timeout int64 // 超时时间(单位:秒)
RetryTimes int64 // 重试次数
RetryInterval int64 // 重试间隔(单位:秒)
NotifyStatus int64 // 执行结束是否通知 1:不通知 2:失败通知 3:结束通知 4:结果关键字匹配通知
NotifyType int64 // 通知类型 1:邮件 2:webhook
NotifyReceiverEmail string // 通知者邮箱地址(多个用,分割)
NotifyKeyword string // 通知匹配关键字(多个用,分割)
Remark string // 备注
IsUsed int64 // 是否启用 1:是 -1:否
}
type ModifyCronTaskData ¶
type ModifyCronTaskData struct {
Name string // 任务名称
Spec string // crontab 表达式
Command string // 执行命令
Protocol int64 // 执行方式 1:shell 2:http
HttpMethod int64 // http 请求方式 1:get 2:post
Timeout int64 // 超时时间(单位:秒)
RetryTimes int64 // 重试次数
RetryInterval int64 // 重试间隔(单位:秒)
NotifyStatus int64 // 执行结束是否通知 1:不通知 2:失败通知 3:结束通知 4:结果关键字匹配通知
NotifyType int64 // 通知类型 1:邮件 2:webhook
NotifyReceiverEmail string // 通知者邮箱地址(多个用,分割)
NotifyKeyword string // 通知匹配关键字(多个用,分割)
Remark string // 备注
IsUsed int64 // 是否启用 1:是 -1:否
}
type SearchData ¶
type SearchOneData ¶
type SearchOneData struct {
Id int64 // 任务ID
}
type Service ¶
type Service interface {
Create(ctx core.Context, createData *CreateCronTaskData) (id int64, err error)
Modify(ctx core.Context, id int64, modifyData *ModifyCronTaskData) (err error)
PageList(ctx core.Context, searchData *SearchData) (cronTasks []*model.CronTask, err error)
PageListCount(ctx core.Context, searchData *SearchData) (total int64, err error)
UpdateUsed(ctx core.Context, id, used int64) (err error)
Execute(ctx core.Context, id int64) (err error)
Detail(ctx core.Context, searchOneData *SearchOneData) (cronTask *model.CronTask, err error)
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.