Documentation ¶
Index ¶
- func AddHostedLifecycleRoutine[U IHostedLifecycleRoutine](builder IBuilder)
- func AddHostedRoutine[U IHostedRoutine](builder IBuilder)
- func AddKeyedOption[T any](builder IBuilder, key string, path string)
- func AddKeyedOptionFactory[T any](builder IBuilder, key string, factory func() T)
- func AddKeyedScoped[U any](builder IBuilder, key any) *injection.RoutineDescriptor
- func AddKeyedScopedFactory[U any](builder IBuilder, key any, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
- func AddKeyedSingleton[U any](builder IBuilder, key any) *injection.RoutineDescriptor
- func AddKeyedSingletonFactory[U any](builder IBuilder, key any, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
- func AddKeyedTransient[U any](builder IBuilder, key any) *injection.RoutineDescriptor
- func AddKeyedTransientFactory[U any](builder IBuilder, key any, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
- func AddLogFormatter(builder IBuilder, name string, formatter func(logData *logging.LogData) string)
- func AddLogHandler[T logging.ILogHandler](builder IBuilder, factory func() T)
- func AddOption[T any](builder IBuilder, path string)
- func AddOptionFactory[T any](builder IBuilder, factory func() T)
- func AddScoped[U any](builder IBuilder) *injection.RoutineDescriptor
- func AddScopedFactory[U any](builder IBuilder, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
- func AddSingleton[U any](builder IBuilder) *injection.RoutineDescriptor
- func AddSingletonFactory[U any](builder IBuilder, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
- func AddTransient[U any](builder IBuilder) *injection.RoutineDescriptor
- func AddTransientFactory[U any](builder IBuilder, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
- func AddVariantKeyedScoped[T, U any](builder IBuilder, key any) *injection.RoutineDescriptor
- func AddVariantKeyedScopedFactory[T, U any](builder IBuilder, key any, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
- func AddVariantKeyedSingleton[T, U any](builder IBuilder, key any) *injection.RoutineDescriptor
- func AddVariantKeyedSingletonFactory[T, U any](builder IBuilder, key any, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
- func AddVariantKeyedTransient[T, U any](builder IBuilder, key any) *injection.RoutineDescriptor
- func AddVariantKeyedTransientFactory[T, U any](builder IBuilder, key any, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
- func AddVariantScoped[T, U any](builder IBuilder) *injection.RoutineDescriptor
- func AddVariantScopedFactory[T, U any](builder IBuilder, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
- func AddVariantSingleton[T, U any](builder IBuilder) *injection.RoutineDescriptor
- func AddVariantSingletonFactory[T, U any](builder IBuilder, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
- func AddVariantTransient[T, U any](builder IBuilder) *injection.RoutineDescriptor
- func AddVariantTransientFactory[T, U any](builder IBuilder, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
- func GetRoutine[T any](provider injection.IRoutineProvider) T
- func Inject(scope injection.IRoutineScope, instance any) bool
- func NewStruct[T any]() T
- func Run(h IHost)
- type IBuilder
- type IHost
- type IHostApplication
- type IHostedLifecycleRoutine
- type IHostedLifecycleRoutineContainer
- type IHostedRoutine
- type IHostedRoutineContainer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHostedLifecycleRoutine ¶
func AddHostedLifecycleRoutine[U IHostedLifecycleRoutine](builder IBuilder)
func AddHostedRoutine ¶
func AddHostedRoutine[U IHostedRoutine](builder IBuilder)
func AddKeyedOptionFactory ¶
func AddKeyedScoped ¶
func AddKeyedScoped[U any](builder IBuilder, key any) *injection.RoutineDescriptor
func AddKeyedScopedFactory ¶
func AddKeyedScopedFactory[U any](builder IBuilder, key any, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
func AddKeyedSingleton ¶
func AddKeyedSingleton[U any](builder IBuilder, key any) *injection.RoutineDescriptor
func AddKeyedSingletonFactory ¶
func AddKeyedSingletonFactory[U any](builder IBuilder, key any, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
func AddKeyedTransient ¶
func AddKeyedTransient[U any](builder IBuilder, key any) *injection.RoutineDescriptor
func AddKeyedTransientFactory ¶
func AddKeyedTransientFactory[U any](builder IBuilder, key any, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
func AddLogFormatter ¶
func AddLogHandler ¶
func AddLogHandler[T logging.ILogHandler](builder IBuilder, factory func() T)
func AddOptionFactory ¶
func AddScopedFactory ¶
func AddScopedFactory[U any](builder IBuilder, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
func AddSingleton ¶
func AddSingleton[U any](builder IBuilder) *injection.RoutineDescriptor
func AddSingletonFactory ¶
func AddSingletonFactory[U any](builder IBuilder, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
func AddTransient ¶
func AddTransient[U any](builder IBuilder) *injection.RoutineDescriptor
func AddTransientFactory ¶
func AddTransientFactory[U any](builder IBuilder, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
func AddVariantKeyedScoped ¶
func AddVariantKeyedScoped[T, U any](builder IBuilder, key any) *injection.RoutineDescriptor
func AddVariantKeyedScopedFactory ¶
func AddVariantKeyedScopedFactory[T, U any](builder IBuilder, key any, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
func AddVariantKeyedSingleton ¶
func AddVariantKeyedSingleton[T, U any](builder IBuilder, key any) *injection.RoutineDescriptor
func AddVariantKeyedSingletonFactory ¶
func AddVariantKeyedSingletonFactory[T, U any](builder IBuilder, key any, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
func AddVariantKeyedTransient ¶
func AddVariantKeyedTransient[T, U any](builder IBuilder, key any) *injection.RoutineDescriptor
func AddVariantKeyedTransientFactory ¶
func AddVariantKeyedTransientFactory[T, U any](builder IBuilder, key any, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
func AddVariantScoped ¶
func AddVariantScoped[T, U any](builder IBuilder) *injection.RoutineDescriptor
func AddVariantScopedFactory ¶
func AddVariantScopedFactory[T, U any](builder IBuilder, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
func AddVariantSingleton ¶
func AddVariantSingleton[T, U any](builder IBuilder) *injection.RoutineDescriptor
func AddVariantSingletonFactory ¶
func AddVariantSingletonFactory[T, U any](builder IBuilder, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
func AddVariantTransient ¶
func AddVariantTransient[T, U any](builder IBuilder) *injection.RoutineDescriptor
func AddVariantTransientFactory ¶
func AddVariantTransientFactory[T, U any](builder IBuilder, factory func(scope injection.IRoutineScope) U) *injection.RoutineDescriptor
func GetRoutine ¶
func GetRoutine[T any](provider injection.IRoutineProvider) T
Types ¶
type IBuilder ¶
type IBuilder interface { GetRoutineCollection() injection.IRoutineCollection GetRoutineProvider() injection.IRoutineProvider Build() IHost }
type IHost ¶
type IHost interface { IHostedRoutine GetRoutineProvider() injection.IRoutineProvider }
type IHostApplication ¶
type IHostApplication interface { OnStarted(listener func()) OnStopped(listener func()) OnStopping(listener func()) StopApplication() }
type IHostedLifecycleRoutine ¶
type IHostedLifecycleRoutine interface { IHostedRoutine BeforeStart(ctx context.Context, wg *sync.TimeoutWaitGroup) AfterStart(ctx context.Context, wg *sync.TimeoutWaitGroup) BeforeStop(ctx context.Context, wg *sync.TimeoutWaitGroup) AfterStop(ctx context.Context, wg *sync.TimeoutWaitGroup) }
type IHostedLifecycleRoutineContainer ¶
type IHostedLifecycleRoutineContainer interface { AddHostedLifecycleRoutine(factory func() IHostedLifecycleRoutine) BuildHostedLifecycleRoutines() GetHostedLifecycleRoutines() []IHostedLifecycleRoutine }
type IHostedRoutine ¶
type IHostedRoutine interface { Start(ctx context.Context, wg *sync.TimeoutWaitGroup) Stop(ctx context.Context, wg *sync.TimeoutWaitGroup) }
type IHostedRoutineContainer ¶
type IHostedRoutineContainer interface { AddHostedRoutine(factory func() IHostedRoutine) BuildHostedRoutines() GetHostedRoutines() []IHostedRoutine }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.