...
1
2
3
4
5
6
7
8
9
10
11
12
13
14 package controllers
15
16 import (
17 "go.uber.org/fx"
18
19 "github.com/chaos-mesh/chaos-mesh/controllers/chaosimpl"
20 "github.com/chaos-mesh/chaos-mesh/controllers/pipeline"
21 "github.com/chaos-mesh/chaos-mesh/controllers/podhttpchaos"
22 "github.com/chaos-mesh/chaos-mesh/controllers/podiochaos"
23 "github.com/chaos-mesh/chaos-mesh/controllers/podnetworkchaos"
24 "github.com/chaos-mesh/chaos-mesh/controllers/schedule"
25 "github.com/chaos-mesh/chaos-mesh/controllers/utils/chaosdaemon"
26 "github.com/chaos-mesh/chaos-mesh/controllers/utils/recorder"
27 wfcontrollers "github.com/chaos-mesh/chaos-mesh/pkg/workflow/controllers"
28 )
29
30 var Module = fx.Options(
31 fx.Provide(
32 pipeline.AllSteps,
33 fx.Annotated{
34 Group: "controller",
35 Target: pipeline.NewController,
36 },
37 fx.Annotated{
38 Group: "controller",
39 Target: podnetworkchaos.NewController,
40 },
41 fx.Annotated{
42 Group: "controller",
43 Target: podhttpchaos.NewController,
44 },
45 fx.Annotated{
46 Group: "controller",
47 Target: podiochaos.NewController,
48 },
49
50 chaosdaemon.New,
51 recorder.NewRecorderBuilder,
52 ),
53 fx.Invoke(wfcontrollers.BootstrapWorkflowControllers),
54 schedule.Module,
55 chaosimpl.AllImpl)
56