-
Notifications
You must be signed in to change notification settings - Fork 303
/
wire.go
120 lines (111 loc) · 3.3 KB
/
wire.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
package controllers
import (
"github.com/google/wire"
ctrlclient "sigs.k8s.io/controller-runtime/pkg/client"
"github.com/tilt-dev/tilt/internal/controllers/core/cluster"
"github.com/tilt-dev/tilt/internal/controllers/core/cmd"
"github.com/tilt-dev/tilt/internal/controllers/core/cmdimage"
"github.com/tilt-dev/tilt/internal/controllers/core/configmap"
"github.com/tilt-dev/tilt/internal/controllers/core/dockercomposelogstream"
"github.com/tilt-dev/tilt/internal/controllers/core/dockercomposeservice"
"github.com/tilt-dev/tilt/internal/controllers/core/dockerimage"
"github.com/tilt-dev/tilt/internal/controllers/core/extension"
"github.com/tilt-dev/tilt/internal/controllers/core/extensionrepo"
"github.com/tilt-dev/tilt/internal/controllers/core/filewatch"
"github.com/tilt-dev/tilt/internal/controllers/core/imagemap"
"github.com/tilt-dev/tilt/internal/controllers/core/kubernetesapply"
"github.com/tilt-dev/tilt/internal/controllers/core/kubernetesdiscovery"
"github.com/tilt-dev/tilt/internal/controllers/core/liveupdate"
"github.com/tilt-dev/tilt/internal/controllers/core/podlogstream"
"github.com/tilt-dev/tilt/internal/controllers/core/portforward"
"github.com/tilt-dev/tilt/internal/controllers/core/session"
"github.com/tilt-dev/tilt/internal/controllers/core/tiltfile"
"github.com/tilt-dev/tilt/internal/controllers/core/togglebutton"
"github.com/tilt-dev/tilt/internal/controllers/core/uibutton"
"github.com/tilt-dev/tilt/internal/controllers/core/uiresource"
"github.com/tilt-dev/tilt/internal/controllers/core/uisession"
)
var controllerSet = wire.NewSet(
filewatch.NewController,
kubernetesdiscovery.NewReconciler,
portforward.NewReconciler,
podlogstream.NewController,
podlogstream.NewPodSource,
kubernetesapply.NewReconciler,
cluster.NewReconciler,
ProvideControllers,
)
func ProvideControllers(
fileWatch *filewatch.Controller,
cmds *cmd.Controller,
podlogstreams *podlogstream.Controller,
kubernetesDiscovery *kubernetesdiscovery.Reconciler,
kubernetesApply *kubernetesapply.Reconciler,
uis *uisession.Reconciler,
uir *uiresource.Reconciler,
uib *uibutton.Reconciler,
pfr *portforward.Reconciler,
tfr *tiltfile.Reconciler,
tbr *togglebutton.Reconciler,
extr *extension.Reconciler,
extrr *extensionrepo.Reconciler,
lur *liveupdate.Reconciler,
cmr *configmap.Reconciler,
dir *dockerimage.Reconciler,
cir *cmdimage.Reconciler,
clr *cluster.Reconciler,
dcr *dockercomposeservice.Reconciler,
imr *imagemap.Reconciler,
dclsr *dockercomposelogstream.Reconciler,
sr *session.Reconciler,
) []Controller {
return []Controller{
fileWatch,
cmds,
podlogstreams,
kubernetesDiscovery,
kubernetesApply,
uis,
uir,
uib,
pfr,
tfr,
tbr,
extr,
extrr,
lur,
cmr,
dir,
cir,
clr,
dcr,
imr,
dclsr,
sr,
}
}
var WireSet = wire.NewSet(
NewTiltServerControllerManager,
NewControllerBuilder,
ProvideUncachedObjects,
ProvideDeferredClient,
wire.Bind(new(ctrlclient.Client), new(*DeferredClient)),
cluster.WireSet,
cmd.WireSet,
controllerSet,
uiresource.WireSet,
uisession.WireSet,
uibutton.WireSet,
togglebutton.WireSet,
tiltfile.WireSet,
extensionrepo.WireSet,
extension.WireSet,
liveupdate.WireSet,
configmap.WireSet,
dockerimage.WireSet,
cmdimage.WireSet,
dockercomposeservice.WireSet,
imagemap.WireSet,
dockercomposelogstream.WireSet,
session.WireSet,
)