scheduling

package
v0.0.0-...-8aeb8a1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 4 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL