Documentation ¶
Index ¶
- Variables
- func AddJobConfig(job utils.CRONConfig)
- func CancelJob(scheduler string, jobName string) error
- func DeleteJobRoute(w http.ResponseWriter, req *http.Request)
- func DeregisterJob(scheduler string, name string)
- func GetJobRoute(w http.ResponseWriter, req *http.Request)
- func GetJobsList() map[string]map[string]ConfigJob
- func Init()
- func InitJobs()
- func InitScheduler()
- func JobFromCommand(command string, args ...string) ...
- func JobFromContainerCommand(containerID string, command string, args ...string) ...
- func ListJobs(w http.ResponseWriter, req *http.Request)
- func ManualRunJob(scheduler string, name string) error
- func RegisterJob(job ConfigJob)
- func RemoveJobConfig(name string)
- func ResetScheduler(scheduler string)
- func RunJobRoute(w http.ResponseWriter, req *http.Request)
- func RunOneTimeJob(job ConfigJob)
- func StopJobRoute(w http.ResponseWriter, req *http.Request)
- type ConfigJob
- type JobRequestJSON
Constants ¶
This section is empty.
Variables ¶
View Source
var CRONLock = make(chan bool, 1)
View Source
var RunningLock = make(chan bool, 1)
Functions ¶
func AddJobConfig ¶
func AddJobConfig(job utils.CRONConfig)
func DeleteJobRoute ¶
func DeleteJobRoute(w http.ResponseWriter, req *http.Request)
func DeregisterJob ¶
func GetJobRoute ¶
func GetJobRoute(w http.ResponseWriter, req *http.Request)
func GetJobsList ¶
func InitScheduler ¶
func InitScheduler()
func JobFromCommand ¶
func JobFromContainerCommand ¶
func ManualRunJob ¶
func RegisterJob ¶
func RegisterJob(job ConfigJob)
func RemoveJobConfig ¶
func RemoveJobConfig(name string)
func ResetScheduler ¶
func ResetScheduler(scheduler string)
func RunJobRoute ¶
func RunJobRoute(w http.ResponseWriter, req *http.Request)
func RunOneTimeJob ¶
func RunOneTimeJob(job ConfigJob)
func StopJobRoute ¶
func StopJobRoute(w http.ResponseWriter, req *http.Request)
Types ¶
type ConfigJob ¶
type ConfigJob struct { Disabled bool Scheduler string Name string Cancellable bool Job func(OnLog func(string), OnFail func(error), OnSuccess func(), ctx context.Context, cancel context.CancelFunc) `json:"-"` Crontab string Running bool LastStarted time.Time LastRun time.Time LastRunSuccess bool Logs []string Ctx context.Context `json:"-"` CancelFunc context.CancelFunc `json:"-"` Container string }
type JobRequestJSON ¶
Click to show internal directories.
Click to hide internal directories.