-
Notifications
You must be signed in to change notification settings - Fork 290
/
actions.go
169 lines (123 loc) · 3.12 KB
/
actions.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
package engine
import (
"net/url"
"time"
"github.com/windmilleng/tilt/internal/dockercompose"
"github.com/windmilleng/tilt/internal/k8s"
"github.com/windmilleng/tilt/internal/model"
"github.com/windmilleng/tilt/internal/store"
v1 "k8s.io/api/core/v1"
)
type ErrorAction struct {
Error error
}
func (ErrorAction) Action() {}
func NewErrorAction(err error) ErrorAction {
return ErrorAction{Error: err}
}
type PodChangeAction struct {
Pod *v1.Pod
}
func (PodChangeAction) Action() {}
func NewPodChangeAction(pod *v1.Pod) PodChangeAction {
return PodChangeAction{Pod: pod}
}
type ServiceChangeAction struct {
Service *v1.Service
URL *url.URL
}
func (ServiceChangeAction) Action() {}
func NewServiceChangeAction(service *v1.Service, url *url.URL) ServiceChangeAction {
return ServiceChangeAction{Service: service, URL: url}
}
type BuildLogAction struct {
ManifestName model.ManifestName
Log []byte
}
func (BuildLogAction) Action() {}
type PodLogAction struct {
ManifestName model.ManifestName
PodID k8s.PodID
Log []byte
}
func (PodLogAction) Action() {}
type LogAction struct {
Log []byte
}
func (LogAction) Action() {}
type BuildCompleteAction struct {
Result store.BuildResultSet
Error error
}
func (BuildCompleteAction) Action() {}
func NewBuildCompleteAction(result store.BuildResultSet, err error) BuildCompleteAction {
return BuildCompleteAction{
Result: result,
Error: err,
}
}
type InitAction struct {
WatchMounts bool
Manifests []model.Manifest
GlobalYAMLManifest model.Manifest
TiltfilePath string
ConfigFiles []string
InitManifests []model.ManifestName
TriggerMode model.TriggerMode
StartTime time.Time
FinishTime time.Time
Err error
}
func (InitAction) Action() {}
type ManifestReloadedAction struct {
OldManifest model.Manifest
NewManifest model.Manifest
Error error
}
func (ManifestReloadedAction) Action() {}
type BuildStartedAction struct {
ManifestName model.ManifestName
StartTime time.Time
FilesChanged []string
Reason model.BuildReason
}
func (BuildStartedAction) Action() {}
type GlobalYAMLApplyStartedAction struct{}
func (GlobalYAMLApplyStartedAction) Action() {}
type GlobalYAMLApplyCompleteAction struct {
Error error
}
func (GlobalYAMLApplyCompleteAction) Action() {}
type HudStoppedAction struct {
err error
}
func (HudStoppedAction) Action() {}
func NewHudStoppedAction(err error) HudStoppedAction {
return HudStoppedAction{err}
}
type ConfigsReloadStartedAction struct {
FilesChanged map[string]bool
}
func (ConfigsReloadStartedAction) Action() {}
type ConfigsReloadedAction struct {
Manifests []model.Manifest
GlobalYAML model.Manifest
ConfigFiles []string
StartTime time.Time
FinishTime time.Time
Err error
}
func (ConfigsReloadedAction) Action() {}
type DockerComposeEventAction struct {
Event dockercompose.Event
}
func (DockerComposeEventAction) Action() {}
type DockerComposeLogAction struct {
ManifestName model.ManifestName
Log []byte
}
func (DockerComposeLogAction) Action() {}
type TiltfileLogAction struct {
Log []byte
}
func (TiltfileLogAction) Action() {}