- Add edge runtime config and opsconsole package - Refactor edge console to use new runtime config - Add service source metadata support - Update CLI adapter with target terminology - Add edge operation contract and event bus replay - Update node label and command ops surface - Add E2E smoke tests and full validation - Update proto runtime definitions - Update documentation and agent-ops rules
29 lines
474 B
Go
29 lines
474 B
Go
package bootstrap
|
|
|
|
import (
|
|
"context"
|
|
|
|
"go.uber.org/fx"
|
|
|
|
"iop/packages/config"
|
|
)
|
|
|
|
func Module(cfg *config.EdgeConfig) fx.Option {
|
|
return fx.Options(
|
|
fx.Provide(
|
|
func() *config.EdgeConfig { return cfg },
|
|
NewRuntime,
|
|
),
|
|
|
|
fx.Invoke(func(lc fx.Lifecycle, rt *Runtime) {
|
|
lc.Append(fx.Hook{
|
|
OnStart: func(ctx context.Context) error {
|
|
return rt.Start(ctx)
|
|
},
|
|
OnStop: func(_ context.Context) error {
|
|
return rt.Stop()
|
|
},
|
|
})
|
|
}),
|
|
)
|
|
}
|