Documentation ¶
Index ¶
- type Schedule
- type Scheduler
- func (instance *Scheduler) AddSchedule(item *Schedule, args ...interface{})
- func (instance *Scheduler) AddScheduleByJson(json string, args ...interface{})
- func (instance *Scheduler) CountHandlers() int
- func (instance *Scheduler) GetErrors() string
- func (instance *Scheduler) GetTimeout() time.Duration
- func (instance *Scheduler) GoString() string
- func (instance *Scheduler) HasErrors() bool
- func (instance *Scheduler) IsAsync() bool
- func (instance *Scheduler) IsPaused() bool
- func (instance *Scheduler) IsStarted() bool
- func (instance *Scheduler) Join()
- func (instance *Scheduler) OnError(handler SchedulerErrorHandler)
- func (instance *Scheduler) OnSchedule(handler SchedulerTaskHandler)
- func (instance *Scheduler) Pause()
- func (instance *Scheduler) Reload()
- func (instance *Scheduler) Resume()
- func (instance *Scheduler) SetAsync(value bool)
- func (instance *Scheduler) Start()
- func (instance *Scheduler) Stop()
- func (instance *Scheduler) String() string
- func (instance *Scheduler) TogglePause()
- func (instance *Scheduler) Uid() string
- type SchedulerErrorHandler
- type SchedulerSettings
- type SchedulerTask
- type SchedulerTaskHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Schedule ¶
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func NewScheduler() *Scheduler
func NewSchedulerFromFile ¶
func NewSchedulerWithSettings ¶
func NewSchedulerWithSettings(settings *SchedulerSettings) *Scheduler
func (*Scheduler) AddSchedule ¶
func (*Scheduler) AddScheduleByJson ¶
func (*Scheduler) CountHandlers ¶
func (*Scheduler) GetTimeout ¶
func (*Scheduler) OnError ¶
func (instance *Scheduler) OnError(handler SchedulerErrorHandler)
func (*Scheduler) OnSchedule ¶
func (instance *Scheduler) OnSchedule(handler SchedulerTaskHandler)
func (*Scheduler) TogglePause ¶
func (instance *Scheduler) TogglePause()
type SchedulerErrorHandler ¶
type SchedulerErrorHandler func(err string)
type SchedulerSettings ¶
type SchedulerSettings struct { Uid string `json:"uid"` Sync bool `json:"sync"` Schedules []*Schedule `json:"schedules"` }
func (*SchedulerSettings) String ¶
func (instance *SchedulerSettings) String() string
type SchedulerTask ¶
type SchedulerTask struct { Uid string Arguments []interface{} Payload map[string]interface{} // contains filtered or unexported fields }
func NewSchedulerTask ¶
func NewSchedulerTask(schedulerUid string, settings *Schedule) *SchedulerTask
func (*SchedulerTask) Error ¶
func (instance *SchedulerTask) Error() string
func (*SchedulerTask) GoString ¶
func (instance *SchedulerTask) GoString() string
func (*SchedulerTask) IsReady ¶
func (instance *SchedulerTask) IsReady() bool
func (*SchedulerTask) Settings ¶
func (instance *SchedulerTask) Settings() *Schedule
func (*SchedulerTask) String ¶
func (instance *SchedulerTask) String() string
type SchedulerTaskHandler ¶
type SchedulerTaskHandler func(schedule *SchedulerTask)
Click to show internal directories.
Click to hide internal directories.