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 ¶ added in v0.1.23
type IJobsProvider interface { GetScheduledJobs() ScheduledJobs GetOneTimeJobs() OneTimeJobs }
type OneTimeJob ¶ added in v0.1.23
func NewOneTimeJob ¶ added in v0.1.24
func NewOneTimeJob(job cron.Job, delay time.Duration) *OneTimeJob
type OneTimeJobs ¶ added in v0.1.24
type OneTimeJobs []*OneTimeJob
func NewOneTimeJobs ¶ added in v0.1.24
func NewOneTimeJobs(jobs ...*OneTimeJob) OneTimeJobs
type ScheduledJob ¶ added in v0.1.23
type ScheduledJob struct { // Job must support Run() func Job cron.Job // Schedule "* */5 * * * *","@every 1h30m10s","@midnight" Schedule string }
ScheduledJob cron
func NewScheduledJob ¶ added in v0.1.24
func NewScheduledJob(job cron.Job, schedule string) *ScheduledJob
type ScheduledJobs ¶ added in v0.1.24
type ScheduledJobs []*ScheduledJob
func NewScheduledJobs ¶ added in v0.1.24
func NewScheduledJobs(jobs ...*ScheduledJob) ScheduledJobs
Click to show internal directories.
Click to hide internal directories.