Versions in this module Expand all Collapse all v0 v0.0.1 Apr 17, 2021 Changes in this version + func HashCode(s string) int + func NowNano() int64 + type CronExpressionParser struct + func NewCronExpressionParser(lastDefined int) *CronExpressionParser + type CronField struct + func (cf *CronField) String() string + type CronTrigger struct + func NewCronTrigger(expr string) (*CronTrigger, error) + func (ct *CronTrigger) Day() []int + func (ct *CronTrigger) DayOfWeek() []int + func (ct *CronTrigger) Description() string + func (ct *CronTrigger) ExpressionForHuman() string + func (ct *CronTrigger) Hour() []int + func (ct *CronTrigger) Minute() []int + func (ct *CronTrigger) Month() []int + func (ct *CronTrigger) NextFireTime(prev int64) (int64, error) + func (ct *CronTrigger) Second() []int + func (ct *CronTrigger) Year() []int + type CurlJob struct + Body string + Headers map[string]string + JobStatus JobStatus + RequestMethod string + Response string + StatusCode int + URL string + func NewCurlJob(method string, url string, body string, headers map[string]string) (*CurlJob, error) + func (cu *CurlJob) Description() string + func (cu *CurlJob) Execute() + func (cu *CurlJob) Key() int + type Item struct + Job Job + Trigger Trigger + type Job interface + Description func() string + Execute func() + Key func() int + type JobStatus int8 + const FAILURE + const NA + const OK + type PriorityQueue []*Item + func (pq *PriorityQueue) Head() *Item + func (pq *PriorityQueue) Pop() interface{} + func (pq *PriorityQueue) Push(x interface{}) + func (pq *PriorityQueue) Remove(i int) interface{} + func (pq PriorityQueue) Len() int + func (pq PriorityQueue) Less(i, j int) bool + func (pq PriorityQueue) Swap(i, j int) + type RunOnceTrigger struct + Delay time.Duration + func NewRunOnceTrigger(delay time.Duration) *RunOnceTrigger + func (st *RunOnceTrigger) Description() string + func (st *RunOnceTrigger) NextFireTime(prev int64) (int64, error) + type ScheduledJob struct + Job Job + NextRunTime int64 + TriggerDescription string + type Scheduler interface + Clear func() + DeleteJob func(key int) error + GetJobKeys func() []int + GetScheduledJob func(key int) (*ScheduledJob, error) + ScheduleJob func(job Job, trigger Trigger) error + Start func() + Stop func() + type ShellJob struct + Cmd string + JobStatus JobStatus + Result string + func NewShellJob(cmd string) *ShellJob + func (sh *ShellJob) Description() string + func (sh *ShellJob) Execute() + func (sh *ShellJob) Key() int + type SimpleTrigger struct + Interval time.Duration + func NewSimpleTrigger(interval time.Duration) *SimpleTrigger + func (st *SimpleTrigger) Description() string + func (st *SimpleTrigger) NextFireTime(prev int64) (int64, error) + type StdScheduler struct + Queue *PriorityQueue + func NewStdScheduler() *StdScheduler + func (sched *StdScheduler) Clear() + func (sched *StdScheduler) DeleteJob(key int) error + func (sched *StdScheduler) GetJobKeys() []int + func (sched *StdScheduler) GetScheduledJob(key int) (*ScheduledJob, error) + func (sched *StdScheduler) ScheduleJob(job Job, trigger Trigger) error + func (sched *StdScheduler) Start() + func (sched *StdScheduler) Stop() + type Trigger interface + Description func() string + NextFireTime func(prev int64) (int64, error)