-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.go
29 lines (27 loc) · 1.17 KB
/
init.go
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
package procyon
import (
"codnect.io/procyon/component"
"codnect.io/procyon/component/condition"
"codnect.io/procyon/runtime"
"codnect.io/procyon/runtime/config"
"codnect.io/procyon/runtime/event"
"codnect.io/procyon/runtime/property"
"codnect.io/procyon/web"
)
func init() {
// 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(web.NewServerProperties, component.WithPrototypeScope())
component.Register(runtime.NewLifecycleProperties, component.WithSingletonScope())
}