Documentation
¶
Overview ¶
Package gs_core provides the core implementation of the Inversion of Control (IoC) container used by the Go-Spring framework.
The container manages the full lifecycle of application beans, including:
Resolving phase: Bean definitions are registered, configuration beans are scanned, conditions are evaluated, and inactive beans are filtered out.
Injecting phase: Dependencies are resolved and injected, and the final bean graph is constructed starting from the specified root beans.
The resolving phase metadata is discarded after the container is fully refreshed to reduce memory usage.
Index ¶
Constants ¶
const ( RefreshDefault = RefreshState(iota) Refreshing Refreshed )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct {
*resolving.Resolving
*injecting.Injecting
State RefreshState
}
Container represents the core IoC container of the Go-Spring framework.
func (*Container) Refresh ¶
Refresh initializes the container and performs the full lifecycle startup.
Parameters:
- p: configuration storage used for property resolution.
- roots: the root bean definitions that act as entry points for dependency injection.
Refresh should only be called once for a container instance. After a successful refresh, resolving metadata is discarded and the container transitions to the Refreshed state.
type RefreshState ¶ added in v1.3.0
type RefreshState int
RefreshState represents the lifecycle state of the container.