...
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/common"
21 "github.com/chaos-mesh/chaos-mesh/controllers/condition"
22 "github.com/chaos-mesh/chaos-mesh/controllers/desiredphase"
23 "github.com/chaos-mesh/chaos-mesh/controllers/finalizers"
24 "github.com/chaos-mesh/chaos-mesh/controllers/podhttpchaos"
25 "github.com/chaos-mesh/chaos-mesh/controllers/podiochaos"
26 "github.com/chaos-mesh/chaos-mesh/controllers/podnetworkchaos"
27 "github.com/chaos-mesh/chaos-mesh/controllers/schedule"
28 "github.com/chaos-mesh/chaos-mesh/controllers/utils/chaosdaemon"
29 "github.com/chaos-mesh/chaos-mesh/controllers/utils/recorder"
30 wfcontrollers "github.com/chaos-mesh/chaos-mesh/pkg/workflow/controllers"
31 )
32
33 var Module = fx.Options(
34 fx.Provide(
35 fx.Annotated{
36 Group: "controller",
37 Target: common.NewController,
38 },
39 fx.Annotated{
40 Group: "controller",
41 Target: finalizers.NewController,
42 },
43 fx.Annotated{
44 Group: "controller",
45 Target: desiredphase.NewController,
46 },
47 fx.Annotated{
48 Group: "controller",
49 Target: condition.NewController,
50 },
51 fx.Annotated{
52 Group: "controller",
53 Target: podnetworkchaos.NewController,
54 },
55 fx.Annotated{
56 Group: "controller",
57 Target: podhttpchaos.NewController,
58 },
59 fx.Annotated{
60 Group: "controller",
61 Target: podiochaos.NewController,
62 },
63
64 chaosdaemon.New,
65 recorder.NewRecorderBuilder,
66 ),
67 fx.Invoke(wfcontrollers.BootstrapWorkflowControllers),
68 schedule.Module,
69 chaosimpl.AllImpl)
70