Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TypeIBackgroundTasks = di.GetInterfaceReflectType((*IBackgroundTasks)(nil)) TypeIJobsProvider = di.GetInterfaceReflectType((*IJobsProvider)(nil)) )
Functions ¶
func AddBackgroundTasks ¶
AddBackgroundTasks adds service to the DI container
Types ¶
type IBackgroundTasks ¶
type IBackgroundTasks interface { }
func GetBackgroundTasksFromContainer ¶
func GetBackgroundTasksFromContainer(ctn di.Container) IBackgroundTasks
type IJobsProvider ¶
type IJobsProvider interface { GetScheduledJobs() ScheduledJobs GetOneTimeJobs() OneTimeJobs }
type OneTimeJob ¶
func NewOneTimeJob ¶
func NewOneTimeJob(job cron.Job, delay time.Duration) *OneTimeJob
type OneTimeJobs ¶
type OneTimeJobs []*OneTimeJob
func NewOneTimeJobs ¶
func NewOneTimeJobs(jobs ...*OneTimeJob) OneTimeJobs
type ScheduledJob ¶
type ScheduledJob struct { // Job must support Run() func Job cron.Job // Schedule "* */5 * * * *","@every 1h30m10s","@midnight" Schedule string }
ScheduledJob cron
func NewScheduledJob ¶
func NewScheduledJob(job cron.Job, schedule string) *ScheduledJob
type ScheduledJobs ¶
type ScheduledJobs []*ScheduledJob
func NewScheduledJobs ¶
func NewScheduledJobs(jobs ...*ScheduledJob) ScheduledJobs
Click to show internal directories.
Click to hide internal directories.