Documentation
¶
Index ¶
- Constants
- Variables
- func EngineDependencyName(schemaName string) string
- func Registry() it.DynamicResourceEngineRegistry
- type DynamicResourceModule
- func (*DynamicResourceModule) Deps() []string
- func (*DynamicResourceModule) Init() error
- func (*DynamicResourceModule) IsInternal() bool
- func (*DynamicResourceModule) LabelKey() string
- func (*DynamicResourceModule) Name() string
- func (*DynamicResourceModule) OnAppStarted() error
- func (*DynamicResourceModule) Version() semver.SemVer
Constants ¶
const EngineNamePrefix = "engine_"
EngineNamePrefix prefixes the dependency container name under which a feature module registers its engine, e.g. "engine_iam_user".
const ModuleName = "dynamicresource"
ModuleName is the name feature modules must list in their Deps() to use resource engines.
Variables ¶
var ModuleSingleton modules.InCodeModule = &DynamicResourceModule{}
ModuleSingleton is the exported symbol that will be looked up by the plugin loader
Functions ¶
func EngineDependencyName ¶
EngineDependencyName is the name to register an engine under, and to inject it by.
func Registry ¶
func Registry() it.DynamicResourceEngineRegistry
Registry returns the process-wide engine registry.
Types ¶
type DynamicResourceModule ¶
type DynamicResourceModule struct {
}
func (*DynamicResourceModule) Deps ¶
func (*DynamicResourceModule) Deps() []string
Deps implements InCodeModule.
func (*DynamicResourceModule) Init ¶
func (*DynamicResourceModule) Init() error
Init implements InCodeModule. It hands the core services that every engine needs to the registry, so that feature modules can create their engines during their own Init(). This module is initialized before them because they declare it in their Deps().
func (*DynamicResourceModule) IsInternal ¶
func (*DynamicResourceModule) IsInternal() bool
IsInternal implements InCodeModule.
func (*DynamicResourceModule) LabelKey ¶
func (*DynamicResourceModule) LabelKey() string
LabelKey implements InCodeModule.
func (*DynamicResourceModule) Name ¶
func (*DynamicResourceModule) Name() string
Name implements InCodeModule.
func (*DynamicResourceModule) OnAppStarted ¶
func (*DynamicResourceModule) OnAppStarted() error
OnAppStarted implements InCodeModuleAppStarted.
It matches every "function"-kind computed field against the functions its engine registered. The check has to run here rather than at engine construction: a feature module builds its engines and registers their functions inside its own Init(), which is long after this module's. By the time any OnAppStarted runs, every module's Init() has completed — so a missing function fails the boot with a precise message instead of surfacing as a broken read later.
func (*DynamicResourceModule) Version ¶
func (*DynamicResourceModule) Version() semver.SemVer
Version implements InCodeModule.