Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CronScheduler ¶
type CronScheduler struct {
// contains filtered or unexported fields
}
CronScheduler is used for scheduling TaskService.Sync() call
func NewCronScheduler ¶
func NewCronScheduler() *CronScheduler
NewCronScheduler return CronScheduler but not started!! for starting scheduling run CronScheduler.Start()
func (*CronScheduler) Close ¶
func (s *CronScheduler) Close() error
func (*CronScheduler) Remove ¶
func (s *CronScheduler) Remove(source, collection string) error
Remove delete source_collection pair from cron scheduler
func (*CronScheduler) Schedule ¶
func (s *CronScheduler) Schedule(source, collection, scheduleTiming string) error
Schedule adds source_collection pair to cron scheduler with scheduleTiming (standard cron format e.g. */5 1,2,3 * * *)
func (*CronScheduler) Start ¶
func (s *CronScheduler) Start(executeFunc func(source, collection string, retryCount int))
Start initialize executeFunc and start cron scheduler job
Click to show internal directories.
Click to hide internal directories.