Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefinitionRegistry ¶
type DefinitionRegistry interface {
RegisterMeta(m *component_definition.Meta)
GetMetas(opts ...Option) []*component_definition.Meta
GetMetaByName(name string) *component_definition.Meta
GetMetaOrRegister(name string, handler RegisterMeta) *component_definition.Meta
}
func DefaultDefinitionRegistry ¶
func DefaultDefinitionRegistry() DefinitionRegistry
type FuncSingletonFactory ¶
type FuncSingletonFactory func() (*component_definition.Meta, error)
func (FuncSingletonFactory) GetComponent ¶
func (d FuncSingletonFactory) GetComponent() (*component_definition.Meta, error)
type Option ¶
type Option func(m *component_definition.Meta) bool
func FuncNameAndResult ¶
func InterfaceType ¶
type RegisterMeta ¶
type RegisterMeta func() *component_definition.Meta
type SingletonComponentRegistry ¶
type SingletonComponentRegistry interface {
AddSingleton(name string, meta *component_definition.Meta)
AddSingletonFactory(name string, method SingletonFactory)
GetSingleton(name string, allowEarlyReference bool) (*component_definition.Meta, error)
RemoveSingleton(name string)
GetSingletonOrCreateByFactory(name string, factory SingletonFactory) (*component_definition.Meta, error)
IsSingletonCurrentlyInCreation(name string) bool
}
func DefaultSingletonComponentRegistry ¶
func DefaultSingletonComponentRegistry() SingletonComponentRegistry
type SingletonFactory ¶
type SingletonFactory interface {
GetComponent() (*component_definition.Meta, error)
}
type SingletonRegistry ¶
type SingletonRegistry interface {
RegisterSingleton(singleton any)
GetSingleton(name string) (any, error)
ContainsSingleton(name string) bool
GetSingletonNames() []string
GetSingletonCount() int
}
func NewRegistry ¶
func NewRegistry() SingletonRegistry
Click to show internal directories.
Click to hide internal directories.