-
Notifications
You must be signed in to change notification settings - Fork 51
/
mocksupervisor.go
251 lines (214 loc) · 8.59 KB
/
mocksupervisor.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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
// Code generated by MockGen. DO NOT EDIT.
// Source: controller/internal/supervisor/interfaces.go
// Package mocksupervisor is a generated GoMock package.
package mocksupervisor
import (
context "context"
reflect "reflect"
time "time"
gomock "github.com/golang/mock/gomock"
aclprovider "go.aporeto.io/trireme-lib/controller/pkg/aclprovider"
policy "go.aporeto.io/trireme-lib/policy"
)
// MockSupervisor is a mock of Supervisor interface
// nolint
type MockSupervisor struct {
ctrl *gomock.Controller
recorder *MockSupervisorMockRecorder
}
// MockSupervisorMockRecorder is the mock recorder for MockSupervisor
// nolint
type MockSupervisorMockRecorder struct {
mock *MockSupervisor
}
// NewMockSupervisor creates a new mock instance
// nolint
func NewMockSupervisor(ctrl *gomock.Controller) *MockSupervisor {
mock := &MockSupervisor{ctrl: ctrl}
mock.recorder = &MockSupervisorMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
// nolint
func (m *MockSupervisor) EXPECT() *MockSupervisorMockRecorder {
return m.recorder
}
// Supervise mocks base method
// nolint
func (m *MockSupervisor) Supervise(contextID string, puInfo *policy.PUInfo) error {
ret := m.ctrl.Call(m, "Supervise", contextID, puInfo)
ret0, _ := ret[0].(error)
return ret0
}
// Supervise indicates an expected call of Supervise
// nolint
func (mr *MockSupervisorMockRecorder) Supervise(contextID, puInfo interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Supervise", reflect.TypeOf((*MockSupervisor)(nil).Supervise), contextID, puInfo)
}
// Unsupervise mocks base method
// nolint
func (m *MockSupervisor) Unsupervise(contextID string) error {
ret := m.ctrl.Call(m, "Unsupervise", contextID)
ret0, _ := ret[0].(error)
return ret0
}
// Unsupervise indicates an expected call of Unsupervise
// nolint
func (mr *MockSupervisorMockRecorder) Unsupervise(contextID interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Unsupervise", reflect.TypeOf((*MockSupervisor)(nil).Unsupervise), contextID)
}
// Run mocks base method
// nolint
func (m *MockSupervisor) Run(ctx context.Context) error {
ret := m.ctrl.Call(m, "Run", ctx)
ret0, _ := ret[0].(error)
return ret0
}
// Run indicates an expected call of Run
// nolint
func (mr *MockSupervisorMockRecorder) Run(ctx interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockSupervisor)(nil).Run), ctx)
}
// SetTargetNetworks mocks base method
// nolint
func (m *MockSupervisor) SetTargetNetworks(arg0 []string) error {
ret := m.ctrl.Call(m, "SetTargetNetworks", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// SetTargetNetworks indicates an expected call of SetTargetNetworks
// nolint
func (mr *MockSupervisorMockRecorder) SetTargetNetworks(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTargetNetworks", reflect.TypeOf((*MockSupervisor)(nil).SetTargetNetworks), arg0)
}
// CleanUp mocks base method
// nolint
func (m *MockSupervisor) CleanUp() error {
ret := m.ctrl.Call(m, "CleanUp")
ret0, _ := ret[0].(error)
return ret0
}
// CleanUp indicates an expected call of CleanUp
// nolint
func (mr *MockSupervisorMockRecorder) CleanUp() *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CleanUp", reflect.TypeOf((*MockSupervisor)(nil).CleanUp))
}
// EnableIPTablesPacketTracing mocks base method
// nolint
func (m *MockSupervisor) EnableIPTablesPacketTracing(ctx context.Context, contextID string, interval time.Duration) error {
ret := m.ctrl.Call(m, "EnableIPTablesPacketTracing", ctx, contextID, interval)
ret0, _ := ret[0].(error)
return ret0
}
// EnableIPTablesPacketTracing indicates an expected call of EnableIPTablesPacketTracing
// nolint
func (mr *MockSupervisorMockRecorder) EnableIPTablesPacketTracing(ctx, contextID, interval interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableIPTablesPacketTracing", reflect.TypeOf((*MockSupervisor)(nil).EnableIPTablesPacketTracing), ctx, contextID, interval)
}
// MockImplementor is a mock of Implementor interface
// nolint
type MockImplementor struct {
ctrl *gomock.Controller
recorder *MockImplementorMockRecorder
}
// MockImplementorMockRecorder is the mock recorder for MockImplementor
// nolint
type MockImplementorMockRecorder struct {
mock *MockImplementor
}
// NewMockImplementor creates a new mock instance
// nolint
func NewMockImplementor(ctrl *gomock.Controller) *MockImplementor {
mock := &MockImplementor{ctrl: ctrl}
mock.recorder = &MockImplementorMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
// nolint
func (m *MockImplementor) EXPECT() *MockImplementorMockRecorder {
return m.recorder
}
// ConfigureRules mocks base method
// nolint
func (m *MockImplementor) ConfigureRules(version int, contextID string, containerInfo *policy.PUInfo) error {
ret := m.ctrl.Call(m, "ConfigureRules", version, contextID, containerInfo)
ret0, _ := ret[0].(error)
return ret0
}
// ConfigureRules indicates an expected call of ConfigureRules
// nolint
func (mr *MockImplementorMockRecorder) ConfigureRules(version, contextID, containerInfo interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigureRules", reflect.TypeOf((*MockImplementor)(nil).ConfigureRules), version, contextID, containerInfo)
}
// UpdateRules mocks base method
// nolint
func (m *MockImplementor) UpdateRules(version int, contextID string, containerInfo, oldContainerInfo *policy.PUInfo) error {
ret := m.ctrl.Call(m, "UpdateRules", version, contextID, containerInfo, oldContainerInfo)
ret0, _ := ret[0].(error)
return ret0
}
// UpdateRules indicates an expected call of UpdateRules
// nolint
func (mr *MockImplementorMockRecorder) UpdateRules(version, contextID, containerInfo, oldContainerInfo interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRules", reflect.TypeOf((*MockImplementor)(nil).UpdateRules), version, contextID, containerInfo, oldContainerInfo)
}
// DeleteRules mocks base method
// nolint
func (m *MockImplementor) DeleteRules(version int, context, tcpPorts, udpPorts, mark, uid, proxyPort, puType string, exclusions []string) error {
ret := m.ctrl.Call(m, "DeleteRules", version, context, tcpPorts, udpPorts, mark, uid, proxyPort, puType, exclusions)
ret0, _ := ret[0].(error)
return ret0
}
// DeleteRules indicates an expected call of DeleteRules
// nolint
func (mr *MockImplementorMockRecorder) DeleteRules(version, context, tcpPorts, udpPorts, mark, uid, proxyPort, puType, exclusions interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRules", reflect.TypeOf((*MockImplementor)(nil).DeleteRules), version, context, tcpPorts, udpPorts, mark, uid, proxyPort, puType, exclusions)
}
// SetTargetNetworks mocks base method
// nolint
func (m *MockImplementor) SetTargetNetworks(arg0, arg1 []string) error {
ret := m.ctrl.Call(m, "SetTargetNetworks", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// SetTargetNetworks indicates an expected call of SetTargetNetworks
// nolint
func (mr *MockImplementorMockRecorder) SetTargetNetworks(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTargetNetworks", reflect.TypeOf((*MockImplementor)(nil).SetTargetNetworks), arg0, arg1)
}
// Run mocks base method
// nolint
func (m *MockImplementor) Run(ctx context.Context) error {
ret := m.ctrl.Call(m, "Run", ctx)
ret0, _ := ret[0].(error)
return ret0
}
// Run indicates an expected call of Run
// nolint
func (mr *MockImplementorMockRecorder) Run(ctx interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockImplementor)(nil).Run), ctx)
}
// CleanUp mocks base method
// nolint
func (m *MockImplementor) CleanUp() error {
ret := m.ctrl.Call(m, "CleanUp")
ret0, _ := ret[0].(error)
return ret0
}
// CleanUp indicates an expected call of CleanUp
// nolint
func (mr *MockImplementorMockRecorder) CleanUp() *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CleanUp", reflect.TypeOf((*MockImplementor)(nil).CleanUp))
}
// ACLProvider mocks base method
// nolint
func (m *MockImplementor) ACLProvider() aclprovider.IptablesProvider {
ret := m.ctrl.Call(m, "ACLProvider")
ret0, _ := ret[0].(aclprovider.IptablesProvider)
return ret0
}
// ACLProvider indicates an expected call of ACLProvider
// nolint
func (mr *MockImplementorMockRecorder) ACLProvider() *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ACLProvider", reflect.TypeOf((*MockImplementor)(nil).ACLProvider))
}