Documentation
¶
Index ¶
Constants ¶
const ( RefreshDefault = RefreshState(iota) RefreshPrepare Refreshing Refreshed )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConditionContext ¶ added in v1.2.3
type ConditionContext struct {
// contains filtered or unexported fields
}
ConditionContext provides an evaluation context for conditions during bean resolution.
func (*ConditionContext) Find ¶ added in v1.2.3
func (c *ConditionContext) Find(beanID gs.BeanID) ([]gs.ConditionBean, error)
Find returns all beans that match the provided selector and are successfully resolved (active).
func (*ConditionContext) Has ¶ added in v1.2.3
func (c *ConditionContext) Has(key string) bool
Has checks if a configuration property exists.
type RefreshState ¶
type RefreshState int
RefreshState represents the current state of the container.
type Resolving ¶
type Resolving struct {
// contains filtered or unexported fields
}
Resolving is the core container responsible for holding bean definitions, processing modules, scanning configuration beans, and resolving beans against conditions.
func (*Resolving) Beans ¶
func (c *Resolving) Beans() []*gs_bean.BeanDefinition
Beans returns all active bean definitions, excluding deleted ones.
func (*Resolving) Provide ¶
Provide registers a bean definition. It accepts either an existing instance or a constructor function.
func (*Resolving) Refresh ¶
Refresh performs the full lifecycle of container initialization. The phases are as follows:
- Apply registered modules to register additional beans.
- Scan configuration beans and register methods as beans.
- Resolve conditions for all beans and mark inactive ones as deleted.
- Check for duplicate beans (by type and name).
- Validate that all root beans are resolved and ready to wire.