internal/component: Move Pool into lazy package

This commit is contained in:
Tom Wiesing 2022-10-17 13:08:42 +02:00
parent bcfd0765b0
commit 7c3c84e116
No known key found for this signature in database
8 changed files with 261 additions and 139 deletions

View file

@ -32,7 +32,7 @@ type Distillery struct {
Upstream Upstream
// Pool holds all the components in this pool
pool component.Pool
pool component.ComponentPool
}
// Upstream contains the configuration for accessing remote configuration.
@ -54,6 +54,7 @@ func (dis *Distillery) Context() context.Context {
func e[C component.Component](dis *Distillery) C {
return component.ExportComponent[C](
&dis.pool,
dis.Core,
dis.register,
)
}
@ -61,6 +62,7 @@ func e[C component.Component](dis *Distillery) C {
func ea[C component.Component](dis *Distillery) []C {
return component.ExportComponents[C](
&dis.pool,
dis.Core,
dis.register,
)
}