Documentation ¶
Index ¶
Constants ¶
View Source
const ( ActionRun = baseApi + "/run" // 启动任务 ActionKill = baseApi + "/kill" // 终止任务 ActionLog = baseApi + "/log" // 任务日志 ActionBeat = baseApi + "/log" // 心跳检测 ActionIdleBeat = baseApi + "/log" // 忙碌检测 )
View Source
const ( Success = 200 Error = 500 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CallElement ¶
type CallElement struct { HandleCode int `json:"handleCode"` //200表示正常,500表示失败 HandleMsg string `json:"handleMsg"` }
CallElement 执行器执行完任务后,回调任务结果时使用
func Callback ¶
func Callback(code int, msg string) CallElement
type RunReq ¶
type RunReq struct { JobID int64 `json:"jobId"` // 任务ID ExecutorHandler string `json:"executorHandler"` // 任务标识 }
RunReq 触发任务请求参数
type Schedule ¶
type Schedule interface { AddJob(executorHandler string, spec string, f TaskFunc) (err error) RunJob(jobId string) CallElement }
var Server Schedule
Server 全局调度器
Click to show internal directories.
Click to hide internal directories.