MCPcopy Create free account
hub / github.com/codnect/procyon / DefaultContainer

Struct DefaultContainer

component/container.go:61–78  ·  view source on GitHub ↗

DefaultContainer is the default implementation of the Container interface. It manages component definitions, singleton instances, custom scopes, and lifecycle processing.

Source from the content-addressed store, hash-verified

59// It manages component definitions, singleton instances, custom scopes,
60// and lifecycle processing.
61type DefaultContainer struct {
62 definitions map[string]*Definition
63 muDefinitions sync.RWMutex
64
65 singletons map[string]any
66 singletonState *creationState
67 typesOfSingletons map[string]reflect.Type
68 muSingletons sync.RWMutex
69 resolvableInstances map[reflect.Type]any
70 muResolvableInstances sync.RWMutex
71
72 scopes map[string]Scope
73 muScopes sync.RWMutex
74
75 preProcessors []PreProcessor
76 postProcessors []PostProcessor
77 muProcessors sync.RWMutex
78}
79
80// NewDefaultContainer creates a DefaultContainer.
81func NewDefaultContainer() *DefaultContainer {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected