appcontainer

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseRegistrator

type CloseRegistrator interface {
	OnClose(closer io.Closer)
}

CloseRegistrator provides interface to release resources on close

type Closer

type Closer struct {
	// contains filtered or unexported fields
}

Closer provides a closer interface

func NewCloser

func NewCloser(capacity int) *Closer

NewCloser returns new instance of a closer

func (*Closer) Close

func (a *Closer) Close() error

Close implements Closer interface to clean up resources

func (*Closer) OnClose

func (a *Closer) OnClose(closer io.Closer)

OnClose adds a closer to be called when application exists

type ContainerFactory

type ContainerFactory struct {
	// contains filtered or unexported fields
}

ContainerFactory is default implementation

func NewContainerFactory

func NewContainerFactory(closer CloseRegistrator) *ContainerFactory

NewContainerFactory returns an instance of ContainerFactory

func (*ContainerFactory) CreateContainerWithDependencies

func (f *ContainerFactory) CreateContainerWithDependencies() (*dig.Container, error)

CreateContainerWithDependencies returns an instance of Container

func (*ContainerFactory) WithAdviserDbProvider

func (f *ContainerFactory) WithAdviserDbProvider(p ProvideAdviserDbFn) *ContainerFactory

WithAdviserDbProvider allows to specify custom DB provider

func (*ContainerFactory) WithClientFactoryProvider

func (f *ContainerFactory) WithClientFactoryProvider(p ProvideClientFactoryFn) *ContainerFactory

WithClientFactoryProvider allows to specify custom client.Factory provider

func (*ContainerFactory) WithConfigurationProvider

func (f *ContainerFactory) WithConfigurationProvider(p ProvideConfigurationFn) *ContainerFactory

WithConfigurationProvider allows to specify configuration

func (*ContainerFactory) WithDataprotectionProvider

func (f *ContainerFactory) WithDataprotectionProvider(p ProvideDataprotectionFn) *ContainerFactory

WithDataprotectionProvider allows to specify Data protection provider

func (*ContainerFactory) WithDiscoveryProvider

func (f *ContainerFactory) WithDiscoveryProvider(p ProvideDiscoveryFn) *ContainerFactory

WithDiscoveryProvider allows to specify Discovery

func (*ContainerFactory) WithJwtProvider

func (f *ContainerFactory) WithJwtProvider(p ProvideJwtFn) *ContainerFactory

WithJwtProvider allows to specify custom JWT provider

func (*ContainerFactory) WithSchedulerProvider

func (f *ContainerFactory) WithSchedulerProvider(p ProvideSchedulerFn) *ContainerFactory

WithSchedulerProvider allows to specify custom Scheduler

type ContainerFactoryFn

type ContainerFactoryFn func() (*dig.Container, error)

ContainerFactoryFn defines an app container factory interface

type ProvideAdviserDbFn

type ProvideAdviserDbFn func(cfg *config.Configuration) (adviserdb.Provider, error)

ProvideCaDbFn defines CA DB provider

type ProvideClientFactoryFn

type ProvideClientFactoryFn func(cfg *config.Configuration) (client.Factory, error)

ProvideClientFactoryFn defines client.Facroty provider

type ProvideConfigurationFn

type ProvideConfigurationFn func() (*config.Configuration, error)

ProvideConfigurationFn defines Configuration provider

type ProvideDataprotectionFn

type ProvideDataprotectionFn func() (dataprotection.Provider, error)

ProvideDataprotectionFn defines data protection provider

type ProvideDiscoveryFn

type ProvideDiscoveryFn func() (discovery.Discovery, error)

ProvideDiscoveryFn defines Discovery provider

type ProvideJwtFn

type ProvideJwtFn func(cfg *config.Configuration, dp dataprotection.Provider) (jwt.Parser, jwt.Signer, error)

ProvideJwtFn defines JWT provider

type ProvideSchedulerFn

type ProvideSchedulerFn func() (tasks.Scheduler, error)

ProvideSchedulerFn defines Scheduler provider

Jump to

Keyboard shortcuts

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