Documentation ¶
Index ¶
- Constants
- func CreateJob(j *Job) cron.FuncJob
- func GetJobIDFromKey(key string) int
- func JobKey(nodeUUID string, jobId int) string
- func RunPresetScript(script *models.Script) (result string, err error)
- func UpdateJobLog(jobLogId int, start time.Time, output string, retry int, success bool) error
- func WatchJobs(nodeUUID string) clientv3.WatchChan
- func WatchOnce() clientv3.WatchChan
- func WatchProc(nodeUUID string) clientv3.WatchChan
- func WatchSystem(nodeUUID string) clientv3.WatchChan
- type CMDHandler
- type HTTPHandler
- type Handler
- type Job
- type JobProc
- type Jobs
Constants ¶
View Source
const HttpExecTimeout = 300
Variables ¶
This section is empty.
Functions ¶
func GetJobIDFromKey ¶
func UpdateJobLog ¶
func WatchOnce ¶
Execute the job immediately value If a single node is executed, the value is nodeUUID If the node where the job is located needs to be executed, the value is null ""
func WatchSystem ¶
Types ¶
type CMDHandler ¶
type CMDHandler struct { }
type HTTPHandler ¶
type HTTPHandler struct { }
type Handler ¶
func CreateHandler ¶
type Job ¶
func (*Job) CreateJobLog ¶
func (*Job) RunWithRecovery ¶
func (j *Job) RunWithRecovery()
type JobProc ¶
Information about the current task in execution key: /crony/proc/<node_uuid>/<job_id>/pid</job_id></node_uuid> value: indicates the start execution time The key expires automatically to prevent the key from being cleared after the process exits unexpectedly. The expiration time can be configured
func GetProcFromKey ¶
Click to show internal directories.
Click to hide internal directories.