gs_core

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
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 is the core IoC container of the Go-Spring framework.

func New

func New() *Container

New creates a new IoC container instance.

func (*Container) Refresh

func (c *Container) Refresh(p flatten.Storage, roots []*gs_bean.BeanDefinition) error

Refresh performs the full container lifecycle startup. The container processes application beans in two phases:

  1. Resolving phase: Bean definitions are registered, configuration beans are scanned, conditions are evaluated, and inactive beans are filtered out.

  2. Injecting phase: Dependencies are resolved and injected, and the final bean graph is constructed starting from the specified root beans.

After a successful refresh, resolving-phase metadata is discarded to reduce memory usage, and the container transitions to the Refreshed state.

Parameters:

  • p: configuration storage used for property resolution.
  • roots: root bean definitions that act as entry points for dependency injection.

Refresh should only be called once per container instance.

type RefreshState added in v1.3.0

type RefreshState int

RefreshState represents the lifecycle state of the container.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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