Documentation
¶
Index ¶
- Variables
- func AddCronJob(tag, spec string, repetitions int, started bool, params et.Json, ...) error
- func AddEventJob(tag, spec string, repetitions int, started bool, params et.Json, ...) error
- func AddScheduleJob(tag, schedule string, started bool, params et.Json, fn func(event.EvenMessage)) error
- func Close()
- func HttpGet(w http.ResponseWriter, r *http.Request)
- func HttpStart(w http.ResponseWriter, r *http.Request)
- func HttpStop(w http.ResponseWriter, r *http.Request)
- func Load(tag string, store instances.Store) error
- func RemoveJob(tag string) error
- func SetGetInstance(fn GetInstanceFn)
- func SetSetInstance(fn SetInstanceFn)
- func StartJob(tag string) error
- func Stop() error
- func StopJob(tag string) error
- type GetInstanceFn
- type Job
- type JobStatus
- type Jobs
- type SetInstanceFn
- type TypeJob
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EVENT_CRONTAB_SET = "event:crontab:set" EVENT_CRONTAB_REMOVE = "event:crontab:remove" EVENT_CRONTAB_STOP = "event:crontab:stop" EVENT_CRONTAB_START = "event:crontab:start" )
View Source
var (
ErrJobExists = fmt.Errorf("job already exists")
)
View Source
var (
MSG_CRONTAB_UNLOAD = "crontab unloaded"
)
Functions ¶
func AddCronJob ¶ added in v1.1.197
func AddCronJob(tag, spec string, repetitions int, started bool, params et.Json, fn func(event.EvenMessage)) error
* * AddCronJob * @param tag, spec string, repetitions int, started bool, params et.Json, fn func(event.EvenMessage) * @return error *
func AddEventJob ¶ added in v1.1.182
func AddEventJob(tag, spec string, repetitions int, started bool, params et.Json, fn func(event.EvenMessage)) error
* * AddEventJob * @param tag, spec string, repetitions int, started bool, params et.Json, fn func(event.EvenMessage) * @return error *
func AddScheduleJob ¶ added in v1.1.208
func AddScheduleJob(tag, schedule string, started bool, params et.Json, fn func(event.EvenMessage)) error
* * AddScheduleJob * Add job to crontab in execute local * @param tag, schedule string, started bool, params et.Json, fn func(event.EvenMessage) * @return error *
func HttpGet ¶ added in v1.1.208
func HttpGet(w http.ResponseWriter, r *http.Request)
* * HttpGet * @params w http.ResponseWriter, r *http.Request *
func HttpStart ¶ added in v1.1.208
func HttpStart(w http.ResponseWriter, r *http.Request)
* * HttpStart * @params w http.ResponseWriter, r *http.Request *
func HttpStop ¶ added in v1.1.208
func HttpStop(w http.ResponseWriter, r *http.Request)
* * HttpStop * @params w http.ResponseWriter, r *http.Request *
func SetGetInstance ¶ added in v1.1.209
func SetGetInstance(fn GetInstanceFn)
func SetSetInstance ¶ added in v1.1.209
func SetSetInstance(fn SetInstanceFn)
Types ¶
type Job ¶
type Job struct {
ID string `json:"id"`
ExecuteAt time.Time `json:"execute_at"`
Type TypeJob `json:"type"`
Tag string `json:"tag"`
Channel string `json:"channel"`
Params et.Json `json:"params"`
Spec string `json:"spec"`
Started bool `json:"started"`
Status JobStatus `json:"status"`
HostName string `json:"host_name"`
Attempts int `json:"attempts"`
Repetitions int `json:"repetitions"`
Duration time.Duration `json:"duration"`
// contains filtered or unexported fields
}
type Jobs ¶
type SetInstanceFn ¶ added in v1.1.182
Click to show internal directories.
Click to hide internal directories.