Documentation ¶
Index ¶
- Variables
- func AddScopedIBackgroundTasks(builder *di.Builder, implType reflect.Type)
- func AddScopedIBackgroundTasksByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIJobsProvider(builder *di.Builder, implType reflect.Type)
- func AddScopedIJobsProviderByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIBackgroundTasks(builder *di.Builder, implType reflect.Type)
- func AddSingletonIBackgroundTasksByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIBackgroundTasksByObj(builder *di.Builder, obj interface{})
- func AddSingletonIJobsProvider(builder *di.Builder, implType reflect.Type)
- func AddSingletonIJobsProviderByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIJobsProviderByObj(builder *di.Builder, obj interface{})
- func AddTransientIBackgroundTasks(builder *di.Builder, implType reflect.Type)
- func AddTransientIBackgroundTasksByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIJobsProvider(builder *di.Builder, implType reflect.Type)
- func AddTransientIJobsProviderByFunc(builder *di.Builder, implType reflect.Type, ...)
- type IBackgroundTasks
- type IJobsProvider
- type OneTimeJob
- type OneTimeJobs
- type ScheduledJob
- type ScheduledJobs
Constants ¶
This section is empty.
Variables ¶
var ReflectTypeIBackgroundTasks = di.GetInterfaceReflectType((*IBackgroundTasks)(nil))
ReflectTypeIBackgroundTasks used when your service claims to implement IBackgroundTasks
var ReflectTypeIJobsProvider = di.GetInterfaceReflectType((*IJobsProvider)(nil))
ReflectTypeIJobsProvider used when your service claims to implement IJobsProvider
Functions ¶
func AddScopedIBackgroundTasks ¶
AddScopedIBackgroundTasks adds a type that implements IBackgroundTasks
func AddScopedIBackgroundTasksByFunc ¶
func AddScopedIBackgroundTasksByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddScopedIBackgroundTasksByFunc adds a type by a custom func
func AddScopedIJobsProvider ¶
AddScopedIJobsProvider adds a type that implements IJobsProvider
func AddScopedIJobsProviderByFunc ¶
func AddScopedIJobsProviderByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddScopedIJobsProviderByFunc adds a type by a custom func
func AddSingletonIBackgroundTasks ¶
AddSingletonIBackgroundTasks adds a type that implements IBackgroundTasks
func AddSingletonIBackgroundTasksByFunc ¶
func AddSingletonIBackgroundTasksByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddSingletonIBackgroundTasksByFunc adds a type by a custom func
func AddSingletonIBackgroundTasksByObj ¶
AddSingletonIBackgroundTasksByObj adds a prebuilt obj
func AddSingletonIJobsProvider ¶
AddSingletonIJobsProvider adds a type that implements IJobsProvider
func AddSingletonIJobsProviderByFunc ¶
func AddSingletonIJobsProviderByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddSingletonIJobsProviderByFunc adds a type by a custom func
func AddSingletonIJobsProviderByObj ¶
AddSingletonIJobsProviderByObj adds a prebuilt obj
func AddTransientIBackgroundTasks ¶
AddTransientIBackgroundTasks adds a type that implements IBackgroundTasks
func AddTransientIBackgroundTasksByFunc ¶
func AddTransientIBackgroundTasksByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddTransientIBackgroundTasksByFunc adds a type by a custom func
func AddTransientIJobsProvider ¶
AddTransientIJobsProvider adds a type that implements IJobsProvider
Types ¶
type IBackgroundTasks ¶
type IBackgroundTasks interface { }
IBackgroundTasks ...
func GetIBackgroundTasksFromContainer ¶
func GetIBackgroundTasksFromContainer(ctn di.Container) IBackgroundTasks
GetIBackgroundTasksFromContainer alternative to SafeGetIBackgroundTasksFromContainer but panics of object is not present
func SafeGetIBackgroundTasksFromContainer ¶
func SafeGetIBackgroundTasksFromContainer(ctn di.Container) (IBackgroundTasks, error)
SafeGetIBackgroundTasksFromContainer trys to get the object by type, will not panic, returns nil and error
type IJobsProvider ¶
type IJobsProvider interface { GetScheduledJobs() ScheduledJobs GetOneTimeJobs() OneTimeJobs }
IJobsProvider ...
func GetIJobsProviderFromContainer ¶
func GetIJobsProviderFromContainer(ctn di.Container) IJobsProvider
GetIJobsProviderFromContainer alternative to SafeGetIJobsProviderFromContainer but panics of object is not present
func SafeGetIJobsProviderFromContainer ¶
func SafeGetIJobsProviderFromContainer(ctn di.Container) (IJobsProvider, error)
SafeGetIJobsProviderFromContainer trys to get the object by type, will not panic, returns nil and error
type OneTimeJob ¶
OneTimeJob type
type ScheduledJob ¶
type ScheduledJob struct { // Job must support Run() func Job cron.Job // Schedule "* */5 * * * *","@every 1h30m10s","@midnight" Schedule string }
ScheduledJob cron