github.com/pingcap/br@v5.3.0-alpha.0.20220125034240-ec59c7b6ce30+incompatible/pkg/mock/importer.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/pingcap/kvproto/pkg/import_kvpb (interfaces: ImportKVClient,ImportKV_WriteEngineClient) 3 4 // $ mockgen -package mock github.com/pingcap/kvproto/pkg/import_kvpb ImportKVClient,ImportKV_WriteEngineClient 5 6 // Package mock is a generated GoMock package. 7 package mock 8 9 import ( 10 context "context" 11 reflect "reflect" 12 13 gomock "github.com/golang/mock/gomock" 14 import_kvpb "github.com/pingcap/kvproto/pkg/import_kvpb" 15 grpc "google.golang.org/grpc" 16 metadata "google.golang.org/grpc/metadata" 17 ) 18 19 // MockImportKVClient is a mock of ImportKVClient interface 20 type MockImportKVClient struct { 21 ctrl *gomock.Controller 22 recorder *MockImportKVClientMockRecorder 23 } 24 25 // MockImportKVClientMockRecorder is the mock recorder for MockImportKVClient 26 type MockImportKVClientMockRecorder struct { 27 mock *MockImportKVClient 28 } 29 30 // NewMockImportKVClient creates a new mock instance 31 func NewMockImportKVClient(ctrl *gomock.Controller) *MockImportKVClient { 32 mock := &MockImportKVClient{ctrl: ctrl} 33 mock.recorder = &MockImportKVClientMockRecorder{mock} 34 return mock 35 } 36 37 // EXPECT returns an object that allows the caller to indicate expected use 38 func (m *MockImportKVClient) EXPECT() *MockImportKVClientMockRecorder { 39 return m.recorder 40 } 41 42 // CleanupEngine mocks base method 43 func (m *MockImportKVClient) CleanupEngine(arg0 context.Context, arg1 *import_kvpb.CleanupEngineRequest, arg2 ...grpc.CallOption) (*import_kvpb.CleanupEngineResponse, error) { 44 m.ctrl.T.Helper() 45 varargs := []interface{}{arg0, arg1} 46 for _, a := range arg2 { 47 varargs = append(varargs, a) 48 } 49 ret := m.ctrl.Call(m, "CleanupEngine", varargs...) 50 ret0, _ := ret[0].(*import_kvpb.CleanupEngineResponse) 51 ret1, _ := ret[1].(error) 52 return ret0, ret1 53 } 54 55 // CleanupEngine indicates an expected call of CleanupEngine 56 func (mr *MockImportKVClientMockRecorder) CleanupEngine(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { 57 mr.mock.ctrl.T.Helper() 58 varargs := append([]interface{}{arg0, arg1}, arg2...) 59 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CleanupEngine", reflect.TypeOf((*MockImportKVClient)(nil).CleanupEngine), varargs...) 60 } 61 62 // CloseEngine mocks base method 63 func (m *MockImportKVClient) CloseEngine(arg0 context.Context, arg1 *import_kvpb.CloseEngineRequest, arg2 ...grpc.CallOption) (*import_kvpb.CloseEngineResponse, error) { 64 m.ctrl.T.Helper() 65 varargs := []interface{}{arg0, arg1} 66 for _, a := range arg2 { 67 varargs = append(varargs, a) 68 } 69 ret := m.ctrl.Call(m, "CloseEngine", varargs...) 70 ret0, _ := ret[0].(*import_kvpb.CloseEngineResponse) 71 ret1, _ := ret[1].(error) 72 return ret0, ret1 73 } 74 75 // CloseEngine indicates an expected call of CloseEngine 76 func (mr *MockImportKVClientMockRecorder) CloseEngine(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { 77 mr.mock.ctrl.T.Helper() 78 varargs := append([]interface{}{arg0, arg1}, arg2...) 79 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseEngine", reflect.TypeOf((*MockImportKVClient)(nil).CloseEngine), varargs...) 80 } 81 82 // CompactCluster mocks base method 83 func (m *MockImportKVClient) CompactCluster(arg0 context.Context, arg1 *import_kvpb.CompactClusterRequest, arg2 ...grpc.CallOption) (*import_kvpb.CompactClusterResponse, error) { 84 m.ctrl.T.Helper() 85 varargs := []interface{}{arg0, arg1} 86 for _, a := range arg2 { 87 varargs = append(varargs, a) 88 } 89 ret := m.ctrl.Call(m, "CompactCluster", varargs...) 90 ret0, _ := ret[0].(*import_kvpb.CompactClusterResponse) 91 ret1, _ := ret[1].(error) 92 return ret0, ret1 93 } 94 95 // CompactCluster indicates an expected call of CompactCluster 96 func (mr *MockImportKVClientMockRecorder) CompactCluster(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { 97 mr.mock.ctrl.T.Helper() 98 varargs := append([]interface{}{arg0, arg1}, arg2...) 99 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompactCluster", reflect.TypeOf((*MockImportKVClient)(nil).CompactCluster), varargs...) 100 } 101 102 // GetMetrics mocks base method 103 func (m *MockImportKVClient) GetMetrics(arg0 context.Context, arg1 *import_kvpb.GetMetricsRequest, arg2 ...grpc.CallOption) (*import_kvpb.GetMetricsResponse, error) { 104 m.ctrl.T.Helper() 105 varargs := []interface{}{arg0, arg1} 106 for _, a := range arg2 { 107 varargs = append(varargs, a) 108 } 109 ret := m.ctrl.Call(m, "GetMetrics", varargs...) 110 ret0, _ := ret[0].(*import_kvpb.GetMetricsResponse) 111 ret1, _ := ret[1].(error) 112 return ret0, ret1 113 } 114 115 // GetMetrics indicates an expected call of GetMetrics 116 func (mr *MockImportKVClientMockRecorder) GetMetrics(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { 117 mr.mock.ctrl.T.Helper() 118 varargs := append([]interface{}{arg0, arg1}, arg2...) 119 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMetrics", reflect.TypeOf((*MockImportKVClient)(nil).GetMetrics), varargs...) 120 } 121 122 // GetVersion mocks base method 123 func (m *MockImportKVClient) GetVersion(arg0 context.Context, arg1 *import_kvpb.GetVersionRequest, arg2 ...grpc.CallOption) (*import_kvpb.GetVersionResponse, error) { 124 m.ctrl.T.Helper() 125 varargs := []interface{}{arg0, arg1} 126 for _, a := range arg2 { 127 varargs = append(varargs, a) 128 } 129 ret := m.ctrl.Call(m, "GetVersion", varargs...) 130 ret0, _ := ret[0].(*import_kvpb.GetVersionResponse) 131 ret1, _ := ret[1].(error) 132 return ret0, ret1 133 } 134 135 // GetVersion indicates an expected call of GetVersion 136 func (mr *MockImportKVClientMockRecorder) GetVersion(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { 137 mr.mock.ctrl.T.Helper() 138 varargs := append([]interface{}{arg0, arg1}, arg2...) 139 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVersion", reflect.TypeOf((*MockImportKVClient)(nil).GetVersion), varargs...) 140 } 141 142 // ImportEngine mocks base method 143 func (m *MockImportKVClient) ImportEngine(arg0 context.Context, arg1 *import_kvpb.ImportEngineRequest, arg2 ...grpc.CallOption) (*import_kvpb.ImportEngineResponse, error) { 144 m.ctrl.T.Helper() 145 varargs := []interface{}{arg0, arg1} 146 for _, a := range arg2 { 147 varargs = append(varargs, a) 148 } 149 ret := m.ctrl.Call(m, "ImportEngine", varargs...) 150 ret0, _ := ret[0].(*import_kvpb.ImportEngineResponse) 151 ret1, _ := ret[1].(error) 152 return ret0, ret1 153 } 154 155 // ImportEngine indicates an expected call of ImportEngine 156 func (mr *MockImportKVClientMockRecorder) ImportEngine(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { 157 mr.mock.ctrl.T.Helper() 158 varargs := append([]interface{}{arg0, arg1}, arg2...) 159 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ImportEngine", reflect.TypeOf((*MockImportKVClient)(nil).ImportEngine), varargs...) 160 } 161 162 // OpenEngine mocks base method 163 func (m *MockImportKVClient) OpenEngine(arg0 context.Context, arg1 *import_kvpb.OpenEngineRequest, arg2 ...grpc.CallOption) (*import_kvpb.OpenEngineResponse, error) { 164 m.ctrl.T.Helper() 165 varargs := []interface{}{arg0, arg1} 166 for _, a := range arg2 { 167 varargs = append(varargs, a) 168 } 169 ret := m.ctrl.Call(m, "OpenEngine", varargs...) 170 ret0, _ := ret[0].(*import_kvpb.OpenEngineResponse) 171 ret1, _ := ret[1].(error) 172 return ret0, ret1 173 } 174 175 // OpenEngine indicates an expected call of OpenEngine 176 func (mr *MockImportKVClientMockRecorder) OpenEngine(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { 177 mr.mock.ctrl.T.Helper() 178 varargs := append([]interface{}{arg0, arg1}, arg2...) 179 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenEngine", reflect.TypeOf((*MockImportKVClient)(nil).OpenEngine), varargs...) 180 } 181 182 // SwitchMode mocks base method 183 func (m *MockImportKVClient) SwitchMode(arg0 context.Context, arg1 *import_kvpb.SwitchModeRequest, arg2 ...grpc.CallOption) (*import_kvpb.SwitchModeResponse, error) { 184 m.ctrl.T.Helper() 185 varargs := []interface{}{arg0, arg1} 186 for _, a := range arg2 { 187 varargs = append(varargs, a) 188 } 189 ret := m.ctrl.Call(m, "SwitchMode", varargs...) 190 ret0, _ := ret[0].(*import_kvpb.SwitchModeResponse) 191 ret1, _ := ret[1].(error) 192 return ret0, ret1 193 } 194 195 // SwitchMode indicates an expected call of SwitchMode 196 func (mr *MockImportKVClientMockRecorder) SwitchMode(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { 197 mr.mock.ctrl.T.Helper() 198 varargs := append([]interface{}{arg0, arg1}, arg2...) 199 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SwitchMode", reflect.TypeOf((*MockImportKVClient)(nil).SwitchMode), varargs...) 200 } 201 202 // WriteEngine mocks base method 203 func (m *MockImportKVClient) WriteEngine(arg0 context.Context, arg1 ...grpc.CallOption) (import_kvpb.ImportKV_WriteEngineClient, error) { 204 m.ctrl.T.Helper() 205 varargs := []interface{}{arg0} 206 for _, a := range arg1 { 207 varargs = append(varargs, a) 208 } 209 ret := m.ctrl.Call(m, "WriteEngine", varargs...) 210 ret0, _ := ret[0].(import_kvpb.ImportKV_WriteEngineClient) 211 ret1, _ := ret[1].(error) 212 return ret0, ret1 213 } 214 215 // WriteEngine indicates an expected call of WriteEngine 216 func (mr *MockImportKVClientMockRecorder) WriteEngine(arg0 interface{}, arg1 ...interface{}) *gomock.Call { 217 mr.mock.ctrl.T.Helper() 218 varargs := append([]interface{}{arg0}, arg1...) 219 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteEngine", reflect.TypeOf((*MockImportKVClient)(nil).WriteEngine), varargs...) 220 } 221 222 // WriteEngineV3 mocks base method 223 func (m *MockImportKVClient) WriteEngineV3(arg0 context.Context, arg1 *import_kvpb.WriteEngineV3Request, arg2 ...grpc.CallOption) (*import_kvpb.WriteEngineResponse, error) { 224 m.ctrl.T.Helper() 225 varargs := []interface{}{arg0, arg1} 226 for _, a := range arg2 { 227 varargs = append(varargs, a) 228 } 229 ret := m.ctrl.Call(m, "WriteEngineV3", varargs...) 230 ret0, _ := ret[0].(*import_kvpb.WriteEngineResponse) 231 ret1, _ := ret[1].(error) 232 return ret0, ret1 233 } 234 235 // WriteEngineV3 indicates an expected call of WriteEngineV3 236 func (mr *MockImportKVClientMockRecorder) WriteEngineV3(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { 237 mr.mock.ctrl.T.Helper() 238 varargs := append([]interface{}{arg0, arg1}, arg2...) 239 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteEngineV3", reflect.TypeOf((*MockImportKVClient)(nil).WriteEngineV3), varargs...) 240 } 241 242 // MockImportKV_WriteEngineClient is a mock of ImportKV_WriteEngineClient interface 243 type MockImportKV_WriteEngineClient struct { 244 ctrl *gomock.Controller 245 recorder *MockImportKV_WriteEngineClientMockRecorder 246 } 247 248 // MockImportKV_WriteEngineClientMockRecorder is the mock recorder for MockImportKV_WriteEngineClient 249 type MockImportKV_WriteEngineClientMockRecorder struct { 250 mock *MockImportKV_WriteEngineClient 251 } 252 253 // NewMockImportKV_WriteEngineClient creates a new mock instance 254 func NewMockImportKV_WriteEngineClient(ctrl *gomock.Controller) *MockImportKV_WriteEngineClient { 255 mock := &MockImportKV_WriteEngineClient{ctrl: ctrl} 256 mock.recorder = &MockImportKV_WriteEngineClientMockRecorder{mock} 257 return mock 258 } 259 260 // EXPECT returns an object that allows the caller to indicate expected use 261 func (m *MockImportKV_WriteEngineClient) EXPECT() *MockImportKV_WriteEngineClientMockRecorder { 262 return m.recorder 263 } 264 265 // CloseAndRecv mocks base method 266 func (m *MockImportKV_WriteEngineClient) CloseAndRecv() (*import_kvpb.WriteEngineResponse, error) { 267 m.ctrl.T.Helper() 268 ret := m.ctrl.Call(m, "CloseAndRecv") 269 ret0, _ := ret[0].(*import_kvpb.WriteEngineResponse) 270 ret1, _ := ret[1].(error) 271 return ret0, ret1 272 } 273 274 // CloseAndRecv indicates an expected call of CloseAndRecv 275 func (mr *MockImportKV_WriteEngineClientMockRecorder) CloseAndRecv() *gomock.Call { 276 mr.mock.ctrl.T.Helper() 277 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseAndRecv", reflect.TypeOf((*MockImportKV_WriteEngineClient)(nil).CloseAndRecv)) 278 } 279 280 // CloseSend mocks base method 281 func (m *MockImportKV_WriteEngineClient) CloseSend() error { 282 m.ctrl.T.Helper() 283 ret := m.ctrl.Call(m, "CloseSend") 284 ret0, _ := ret[0].(error) 285 return ret0 286 } 287 288 // CloseSend indicates an expected call of CloseSend 289 func (mr *MockImportKV_WriteEngineClientMockRecorder) CloseSend() *gomock.Call { 290 mr.mock.ctrl.T.Helper() 291 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockImportKV_WriteEngineClient)(nil).CloseSend)) 292 } 293 294 // Context mocks base method 295 func (m *MockImportKV_WriteEngineClient) Context() context.Context { 296 m.ctrl.T.Helper() 297 ret := m.ctrl.Call(m, "Context") 298 ret0, _ := ret[0].(context.Context) 299 return ret0 300 } 301 302 // Context indicates an expected call of Context 303 func (mr *MockImportKV_WriteEngineClientMockRecorder) Context() *gomock.Call { 304 mr.mock.ctrl.T.Helper() 305 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockImportKV_WriteEngineClient)(nil).Context)) 306 } 307 308 // Header mocks base method 309 func (m *MockImportKV_WriteEngineClient) Header() (metadata.MD, error) { 310 m.ctrl.T.Helper() 311 ret := m.ctrl.Call(m, "Header") 312 ret0, _ := ret[0].(metadata.MD) 313 ret1, _ := ret[1].(error) 314 return ret0, ret1 315 } 316 317 // Header indicates an expected call of Header 318 func (mr *MockImportKV_WriteEngineClientMockRecorder) Header() *gomock.Call { 319 mr.mock.ctrl.T.Helper() 320 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockImportKV_WriteEngineClient)(nil).Header)) 321 } 322 323 // RecvMsg mocks base method 324 func (m *MockImportKV_WriteEngineClient) RecvMsg(arg0 interface{}) error { 325 m.ctrl.T.Helper() 326 ret := m.ctrl.Call(m, "RecvMsg", arg0) 327 ret0, _ := ret[0].(error) 328 return ret0 329 } 330 331 // RecvMsg indicates an expected call of RecvMsg 332 func (mr *MockImportKV_WriteEngineClientMockRecorder) RecvMsg(arg0 interface{}) *gomock.Call { 333 mr.mock.ctrl.T.Helper() 334 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockImportKV_WriteEngineClient)(nil).RecvMsg), arg0) 335 } 336 337 // Send mocks base method 338 func (m *MockImportKV_WriteEngineClient) Send(arg0 *import_kvpb.WriteEngineRequest) error { 339 m.ctrl.T.Helper() 340 ret := m.ctrl.Call(m, "Send", arg0) 341 ret0, _ := ret[0].(error) 342 return ret0 343 } 344 345 // Send indicates an expected call of Send 346 func (mr *MockImportKV_WriteEngineClientMockRecorder) Send(arg0 interface{}) *gomock.Call { 347 mr.mock.ctrl.T.Helper() 348 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockImportKV_WriteEngineClient)(nil).Send), arg0) 349 } 350 351 // SendMsg mocks base method 352 func (m *MockImportKV_WriteEngineClient) SendMsg(arg0 interface{}) error { 353 m.ctrl.T.Helper() 354 ret := m.ctrl.Call(m, "SendMsg", arg0) 355 ret0, _ := ret[0].(error) 356 return ret0 357 } 358 359 // SendMsg indicates an expected call of SendMsg 360 func (mr *MockImportKV_WriteEngineClientMockRecorder) SendMsg(arg0 interface{}) *gomock.Call { 361 mr.mock.ctrl.T.Helper() 362 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockImportKV_WriteEngineClient)(nil).SendMsg), arg0) 363 } 364 365 // Trailer mocks base method 366 func (m *MockImportKV_WriteEngineClient) Trailer() metadata.MD { 367 m.ctrl.T.Helper() 368 ret := m.ctrl.Call(m, "Trailer") 369 ret0, _ := ret[0].(metadata.MD) 370 return ret0 371 } 372 373 // Trailer indicates an expected call of Trailer 374 func (mr *MockImportKV_WriteEngineClientMockRecorder) Trailer() *gomock.Call { 375 mr.mock.ctrl.T.Helper() 376 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockImportKV_WriteEngineClient)(nil).Trailer)) 377 }