-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodule.go
More file actions
32 lines (29 loc) · 1.23 KB
/
module.go
File metadata and controls
32 lines (29 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package core
import (
"codnect.io/procyon-core/component"
"codnect.io/procyon-core/component/condition"
"codnect.io/procyon-core/runtime"
"codnect.io/procyon-core/runtime/config"
"codnect.io/procyon-core/runtime/event"
"codnect.io/procyon-core/runtime/property"
)
type Module struct {
}
func (m Module) InitModule() error {
// core
component.Register(newConfigContextConfigurer, component.WithName("procyonConfigContextConfigurer"))
// runtime/event
component.Register(event.NewSimpleMulticaster, component.WithName("procyonEventMulticaster"),
component.WithCondition(condition.OnMissingType[event.Multicaster]()),
)
// runtime/config
component.Register(config.NewDefaultResourceResolver, component.WithName("procyonDefaultConfigResourceResolver"))
component.Register(config.NewFileLoader, component.WithName("procyonConfigFileLoader"))
component.Register(config.NewImporter, component.WithName("procyonConfigImporter"))
// runtime/property
component.Register(property.NewYamlSourceLoader, component.WithName("procyonYamlPropertySourceLoader"))
// runtime
component.Register(runtime.NewServerProperties, component.WithPrototypeScope())
component.Register(runtime.NewLifecycleProperties, component.WithSingletonScope())
return nil
}