Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Initer ¶ added in v0.6.3
Initer interface provides method to init a component. During initialization components may NOT be ready. Only safe methods (e.g. not dependant on other components) can be called during initialization.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager provide methods to manage components lifecycle
func NewManager ¶ added in v0.7.5
NewManager creates new component manager
func (*Manager) Init ¶ added in v0.6.3
Init invokes Init method of all components which implements Initer interface
func (*Manager) Inject ¶ added in v0.6.3
func (m *Manager) Inject(components ...interface{})
Inject components in Manager and inject required dependencies Inject can inject interfaces only, tag public struct fields with `inject:""`
func (*Manager) Register ¶
func (m *Manager) Register(components ...interface{})
Register components in Manager and inject required dependencies. Register can inject interfaces only, tag public struct fields with `inject:""`. If the injectable struct already has a value on the tagged field, the value WILL NOT be overridden.