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 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358
|
// Code generated by MockGen. DO NOT EDIT.
// Source: gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/module/agentk2kas_tunnel/router (interfaces: Handler,Tracker,Querier)
//
// Generated by this command:
//
// mockgen -typed -destination mock.go -package mock_agentk2kas_router gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/module/agentk2kas_tunnel/router Handler,Tracker,Querier
//
// Package mock_agentk2kas_router is a generated GoMock package.
package mock_agentk2kas_router
import (
context "context"
reflect "reflect"
time "time"
api "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/api"
rpc "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v16/internal/tunnel/rpc"
gomock "go.uber.org/mock/gomock"
)
// MockHandler is a mock of Handler interface.
type MockHandler struct {
ctrl *gomock.Controller
recorder *MockHandlerMockRecorder
}
// MockHandlerMockRecorder is the mock recorder for MockHandler.
type MockHandlerMockRecorder struct {
mock *MockHandler
}
// NewMockHandler creates a new mock instance.
func NewMockHandler(ctrl *gomock.Controller) *MockHandler {
mock := &MockHandler{ctrl: ctrl}
mock.recorder = &MockHandlerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockHandler) EXPECT() *MockHandlerMockRecorder {
return m.recorder
}
// HandleTunnel mocks base method.
func (m *MockHandler) HandleTunnel(arg0 context.Context, arg1 *api.AgentInfo, arg2 rpc.ReverseTunnel_ConnectServer) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "HandleTunnel", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// HandleTunnel indicates an expected call of HandleTunnel.
func (mr *MockHandlerMockRecorder) HandleTunnel(arg0, arg1, arg2 any) *MockHandlerHandleTunnelCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleTunnel", reflect.TypeOf((*MockHandler)(nil).HandleTunnel), arg0, arg1, arg2)
return &MockHandlerHandleTunnelCall{Call: call}
}
// MockHandlerHandleTunnelCall wrap *gomock.Call
type MockHandlerHandleTunnelCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockHandlerHandleTunnelCall) Return(arg0 error) *MockHandlerHandleTunnelCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockHandlerHandleTunnelCall) Do(f func(context.Context, *api.AgentInfo, rpc.ReverseTunnel_ConnectServer) error) *MockHandlerHandleTunnelCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockHandlerHandleTunnelCall) DoAndReturn(f func(context.Context, *api.AgentInfo, rpc.ReverseTunnel_ConnectServer) error) *MockHandlerHandleTunnelCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// MockTracker is a mock of Tracker interface.
type MockTracker struct {
ctrl *gomock.Controller
recorder *MockTrackerMockRecorder
}
// MockTrackerMockRecorder is the mock recorder for MockTracker.
type MockTrackerMockRecorder struct {
mock *MockTracker
}
// NewMockTracker creates a new mock instance.
func NewMockTracker(ctrl *gomock.Controller) *MockTracker {
mock := &MockTracker{ctrl: ctrl}
mock.recorder = &MockTrackerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockTracker) EXPECT() *MockTrackerMockRecorder {
return m.recorder
}
// GC mocks base method.
func (m *MockTracker) GC(arg0 context.Context, arg1 []int64) (int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GC", arg0, arg1)
ret0, _ := ret[0].(int)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GC indicates an expected call of GC.
func (mr *MockTrackerMockRecorder) GC(arg0, arg1 any) *MockTrackerGCCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GC", reflect.TypeOf((*MockTracker)(nil).GC), arg0, arg1)
return &MockTrackerGCCall{Call: call}
}
// MockTrackerGCCall wrap *gomock.Call
type MockTrackerGCCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockTrackerGCCall) Return(arg0 int, arg1 error) *MockTrackerGCCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockTrackerGCCall) Do(f func(context.Context, []int64) (int, error)) *MockTrackerGCCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockTrackerGCCall) DoAndReturn(f func(context.Context, []int64) (int, error)) *MockTrackerGCCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// KASURLsByAgentID mocks base method.
func (m *MockTracker) KASURLsByAgentID(arg0 context.Context, arg1 int64) ([]string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "KASURLsByAgentID", arg0, arg1)
ret0, _ := ret[0].([]string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// KASURLsByAgentID indicates an expected call of KASURLsByAgentID.
func (mr *MockTrackerMockRecorder) KASURLsByAgentID(arg0, arg1 any) *MockTrackerKASURLsByAgentIDCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KASURLsByAgentID", reflect.TypeOf((*MockTracker)(nil).KASURLsByAgentID), arg0, arg1)
return &MockTrackerKASURLsByAgentIDCall{Call: call}
}
// MockTrackerKASURLsByAgentIDCall wrap *gomock.Call
type MockTrackerKASURLsByAgentIDCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockTrackerKASURLsByAgentIDCall) Return(arg0 []string, arg1 error) *MockTrackerKASURLsByAgentIDCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockTrackerKASURLsByAgentIDCall) Do(f func(context.Context, int64) ([]string, error)) *MockTrackerKASURLsByAgentIDCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockTrackerKASURLsByAgentIDCall) DoAndReturn(f func(context.Context, int64) ([]string, error)) *MockTrackerKASURLsByAgentIDCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Refresh mocks base method.
func (m *MockTracker) Refresh(arg0 context.Context, arg1 time.Duration, arg2 []int64) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Refresh", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// Refresh indicates an expected call of Refresh.
func (mr *MockTrackerMockRecorder) Refresh(arg0, arg1, arg2 any) *MockTrackerRefreshCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Refresh", reflect.TypeOf((*MockTracker)(nil).Refresh), arg0, arg1, arg2)
return &MockTrackerRefreshCall{Call: call}
}
// MockTrackerRefreshCall wrap *gomock.Call
type MockTrackerRefreshCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockTrackerRefreshCall) Return(arg0 error) *MockTrackerRefreshCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockTrackerRefreshCall) Do(f func(context.Context, time.Duration, []int64) error) *MockTrackerRefreshCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockTrackerRefreshCall) DoAndReturn(f func(context.Context, time.Duration, []int64) error) *MockTrackerRefreshCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// RegisterTunnel mocks base method.
func (m *MockTracker) RegisterTunnel(arg0 context.Context, arg1 time.Duration, arg2 int64) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "RegisterTunnel", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// RegisterTunnel indicates an expected call of RegisterTunnel.
func (mr *MockTrackerMockRecorder) RegisterTunnel(arg0, arg1, arg2 any) *MockTrackerRegisterTunnelCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterTunnel", reflect.TypeOf((*MockTracker)(nil).RegisterTunnel), arg0, arg1, arg2)
return &MockTrackerRegisterTunnelCall{Call: call}
}
// MockTrackerRegisterTunnelCall wrap *gomock.Call
type MockTrackerRegisterTunnelCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockTrackerRegisterTunnelCall) Return(arg0 error) *MockTrackerRegisterTunnelCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockTrackerRegisterTunnelCall) Do(f func(context.Context, time.Duration, int64) error) *MockTrackerRegisterTunnelCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockTrackerRegisterTunnelCall) DoAndReturn(f func(context.Context, time.Duration, int64) error) *MockTrackerRegisterTunnelCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// UnregisterTunnel mocks base method.
func (m *MockTracker) UnregisterTunnel(arg0 context.Context, arg1 int64) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UnregisterTunnel", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// UnregisterTunnel indicates an expected call of UnregisterTunnel.
func (mr *MockTrackerMockRecorder) UnregisterTunnel(arg0, arg1 any) *MockTrackerUnregisterTunnelCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UnregisterTunnel", reflect.TypeOf((*MockTracker)(nil).UnregisterTunnel), arg0, arg1)
return &MockTrackerUnregisterTunnelCall{Call: call}
}
// MockTrackerUnregisterTunnelCall wrap *gomock.Call
type MockTrackerUnregisterTunnelCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockTrackerUnregisterTunnelCall) Return(arg0 error) *MockTrackerUnregisterTunnelCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockTrackerUnregisterTunnelCall) Do(f func(context.Context, int64) error) *MockTrackerUnregisterTunnelCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockTrackerUnregisterTunnelCall) DoAndReturn(f func(context.Context, int64) error) *MockTrackerUnregisterTunnelCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// MockQuerier is a mock of Querier interface.
type MockQuerier struct {
ctrl *gomock.Controller
recorder *MockQuerierMockRecorder
}
// MockQuerierMockRecorder is the mock recorder for MockQuerier.
type MockQuerierMockRecorder struct {
mock *MockQuerier
}
// NewMockQuerier creates a new mock instance.
func NewMockQuerier(ctrl *gomock.Controller) *MockQuerier {
mock := &MockQuerier{ctrl: ctrl}
mock.recorder = &MockQuerierMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockQuerier) EXPECT() *MockQuerierMockRecorder {
return m.recorder
}
// KASURLsByAgentID mocks base method.
func (m *MockQuerier) KASURLsByAgentID(arg0 context.Context, arg1 int64) ([]string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "KASURLsByAgentID", arg0, arg1)
ret0, _ := ret[0].([]string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// KASURLsByAgentID indicates an expected call of KASURLsByAgentID.
func (mr *MockQuerierMockRecorder) KASURLsByAgentID(arg0, arg1 any) *MockQuerierKASURLsByAgentIDCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "KASURLsByAgentID", reflect.TypeOf((*MockQuerier)(nil).KASURLsByAgentID), arg0, arg1)
return &MockQuerierKASURLsByAgentIDCall{Call: call}
}
// MockQuerierKASURLsByAgentIDCall wrap *gomock.Call
type MockQuerierKASURLsByAgentIDCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockQuerierKASURLsByAgentIDCall) Return(arg0 []string, arg1 error) *MockQuerierKASURLsByAgentIDCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockQuerierKASURLsByAgentIDCall) Do(f func(context.Context, int64) ([]string, error)) *MockQuerierKASURLsByAgentIDCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockQuerierKASURLsByAgentIDCall) DoAndReturn(f func(context.Context, int64) ([]string, error)) *MockQuerierKASURLsByAgentIDCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
|