Commit: Bulk unfinished work
This commit is contained in:
17
integration/integration_handler.go
Normal file
17
integration/integration_handler.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"git.kocoder.xyz/kocoded/vt/fx/interfaces"
|
||||
"go.uber.org/fx"
|
||||
)
|
||||
|
||||
type IntegrationHandler struct {
|
||||
}
|
||||
|
||||
func NewIntegrationHandler(integrations []interfaces.BasicIntegration, lc fx.Lifecycle) *IntegrationHandler {
|
||||
for _, i := range integrations {
|
||||
lc.Append(fx.StartStopHook(i.OnStart, i.OnStop))
|
||||
}
|
||||
|
||||
return &IntegrationHandler{}
|
||||
}
|
||||
Reference in New Issue
Block a user