Documentation
¶
Overview ¶
Experimental Gimbap Dependency Manager
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FxDependencyManager ¶
type FxDependencyManager struct { IDependencyManager // contains filtered or unexported fields }
func NewFxManager ¶
func NewFxManager() *FxDependencyManager
func (*FxDependencyManager) OnStart ¶
func (f *FxDependencyManager) OnStart()
func (*FxDependencyManager) OnStop ¶
func (f *FxDependencyManager) OnStop()
func (*FxDependencyManager) ResolveDependencies ¶
type GimbapDependencyManager ¶ added in v0.0.7
type GimbapDependencyManager struct { IDependencyManager // contains filtered or unexported fields }
func NewGimbapDependencyManager ¶ added in v0.0.7
func NewGimbapDependencyManager() *GimbapDependencyManager
func (*GimbapDependencyManager) OnStart ¶ added in v0.0.7
func (g *GimbapDependencyManager) OnStart()
func (*GimbapDependencyManager) OnStop ¶ added in v0.0.7
func (g *GimbapDependencyManager) OnStop()
func (*GimbapDependencyManager) ResolveDependencies ¶ added in v0.0.7
type GimbapDependencyManagerContext ¶ added in v0.0.7
type GimbapDependencyManagerContext struct { /* Dependency graph to resolve the dependencies The map will register a list of nodes that require the key node The node will be consumed upon initialization If any node is not consumed then it must throw --> circular dependency or missing dependency */ DependencyGraph map[reflect.Type]map[reflect.Type]*dependencyNode /* The starting node list to resolve the dependencies These are nodes that do not require any other nodes to initialize */ StartNodeMap map[reflect.Type]*dependencyNode // Reference to the instance map InstanceMap map[reflect.Type]reflect.Value }
Context holder to make the dependency manager stateless
func NewGimbapDependencyManagerContext ¶ added in v0.0.7
func NewGimbapDependencyManagerContext(instanceMap map[reflect.Type]reflect.Value) *GimbapDependencyManagerContext
type IDependencyManager ¶
type IDependencyManager interface { // ResolveDependencies the dependencies to the target // // The first parameter is the result map which contains the resolved dependencies. // The second parameter is the list of providers to resolve. ResolveDependencies(instanceMap map[reflect.Type]reflect.Value, providers []*provider.Provider) // Lifecycle methods OnStart() OnStop() }
Click to show internal directories.
Click to hide internal directories.