github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/cdc/capture/mock/capture_mock.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: cdc/capture/capture.go 3 4 // Package mock_capture is a generated GoMock package. 5 package mock_capture 6 7 import ( 8 context "context" 9 io "io" 10 reflect "reflect" 11 12 gomock "github.com/golang/mock/gomock" 13 controller "github.com/pingcap/tiflow/cdc/controller" 14 model "github.com/pingcap/tiflow/cdc/model" 15 owner "github.com/pingcap/tiflow/cdc/owner" 16 etcd "github.com/pingcap/tiflow/pkg/etcd" 17 upstream "github.com/pingcap/tiflow/pkg/upstream" 18 ) 19 20 // MockCapture is a mock of Capture interface. 21 type MockCapture struct { 22 ctrl *gomock.Controller 23 recorder *MockCaptureMockRecorder 24 } 25 26 // MockCaptureMockRecorder is the mock recorder for MockCapture. 27 type MockCaptureMockRecorder struct { 28 mock *MockCapture 29 } 30 31 // NewMockCapture creates a new mock instance. 32 func NewMockCapture(ctrl *gomock.Controller) *MockCapture { 33 mock := &MockCapture{ctrl: ctrl} 34 mock.recorder = &MockCaptureMockRecorder{mock} 35 return mock 36 } 37 38 // EXPECT returns an object that allows the caller to indicate expected use. 39 func (m *MockCapture) EXPECT() *MockCaptureMockRecorder { 40 return m.recorder 41 } 42 43 // Close mocks base method. 44 func (m *MockCapture) Close() { 45 m.ctrl.T.Helper() 46 m.ctrl.Call(m, "Close") 47 } 48 49 // Close indicates an expected call of Close. 50 func (mr *MockCaptureMockRecorder) Close() *gomock.Call { 51 mr.mock.ctrl.T.Helper() 52 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockCapture)(nil).Close)) 53 } 54 55 // Drain mocks base method. 56 func (m *MockCapture) Drain() <-chan struct{} { 57 m.ctrl.T.Helper() 58 ret := m.ctrl.Call(m, "Drain") 59 ret0, _ := ret[0].(<-chan struct{}) 60 return ret0 61 } 62 63 // Drain indicates an expected call of Drain. 64 func (mr *MockCaptureMockRecorder) Drain() *gomock.Call { 65 mr.mock.ctrl.T.Helper() 66 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Drain", reflect.TypeOf((*MockCapture)(nil).Drain)) 67 } 68 69 // GetController mocks base method. 70 func (m *MockCapture) GetController() (controller.Controller, error) { 71 m.ctrl.T.Helper() 72 ret := m.ctrl.Call(m, "GetController") 73 ret0, _ := ret[0].(controller.Controller) 74 ret1, _ := ret[1].(error) 75 return ret0, ret1 76 } 77 78 // GetController indicates an expected call of GetController. 79 func (mr *MockCaptureMockRecorder) GetController() *gomock.Call { 80 mr.mock.ctrl.T.Helper() 81 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetController", reflect.TypeOf((*MockCapture)(nil).GetController)) 82 } 83 84 // GetControllerCaptureInfo mocks base method. 85 func (m *MockCapture) GetControllerCaptureInfo(ctx context.Context) (*model.CaptureInfo, error) { 86 m.ctrl.T.Helper() 87 ret := m.ctrl.Call(m, "GetControllerCaptureInfo", ctx) 88 ret0, _ := ret[0].(*model.CaptureInfo) 89 ret1, _ := ret[1].(error) 90 return ret0, ret1 91 } 92 93 // GetControllerCaptureInfo indicates an expected call of GetControllerCaptureInfo. 94 func (mr *MockCaptureMockRecorder) GetControllerCaptureInfo(ctx interface{}) *gomock.Call { 95 mr.mock.ctrl.T.Helper() 96 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetControllerCaptureInfo", reflect.TypeOf((*MockCapture)(nil).GetControllerCaptureInfo), ctx) 97 } 98 99 // GetEtcdClient mocks base method. 100 func (m *MockCapture) GetEtcdClient() etcd.CDCEtcdClient { 101 m.ctrl.T.Helper() 102 ret := m.ctrl.Call(m, "GetEtcdClient") 103 ret0, _ := ret[0].(etcd.CDCEtcdClient) 104 return ret0 105 } 106 107 // GetEtcdClient indicates an expected call of GetEtcdClient. 108 func (mr *MockCaptureMockRecorder) GetEtcdClient() *gomock.Call { 109 mr.mock.ctrl.T.Helper() 110 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetEtcdClient", reflect.TypeOf((*MockCapture)(nil).GetEtcdClient)) 111 } 112 113 // GetOwner mocks base method. 114 func (m *MockCapture) GetOwner() (owner.Owner, error) { 115 m.ctrl.T.Helper() 116 ret := m.ctrl.Call(m, "GetOwner") 117 ret0, _ := ret[0].(owner.Owner) 118 ret1, _ := ret[1].(error) 119 return ret0, ret1 120 } 121 122 // GetOwner indicates an expected call of GetOwner. 123 func (mr *MockCaptureMockRecorder) GetOwner() *gomock.Call { 124 mr.mock.ctrl.T.Helper() 125 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOwner", reflect.TypeOf((*MockCapture)(nil).GetOwner)) 126 } 127 128 // GetUpstreamInfo mocks base method. 129 func (m *MockCapture) GetUpstreamInfo(arg0 context.Context, arg1 model.UpstreamID, arg2 string) (*model.UpstreamInfo, error) { 130 m.ctrl.T.Helper() 131 ret := m.ctrl.Call(m, "GetUpstreamInfo", arg0, arg1, arg2) 132 ret0, _ := ret[0].(*model.UpstreamInfo) 133 ret1, _ := ret[1].(error) 134 return ret0, ret1 135 } 136 137 // GetUpstreamInfo indicates an expected call of GetUpstreamInfo. 138 func (mr *MockCaptureMockRecorder) GetUpstreamInfo(arg0, arg1, arg2 interface{}) *gomock.Call { 139 mr.mock.ctrl.T.Helper() 140 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUpstreamInfo", reflect.TypeOf((*MockCapture)(nil).GetUpstreamInfo), arg0, arg1, arg2) 141 } 142 143 // GetUpstreamManager mocks base method. 144 func (m *MockCapture) GetUpstreamManager() (*upstream.Manager, error) { 145 m.ctrl.T.Helper() 146 ret := m.ctrl.Call(m, "GetUpstreamManager") 147 ret0, _ := ret[0].(*upstream.Manager) 148 ret1, _ := ret[1].(error) 149 return ret0, ret1 150 } 151 152 // GetUpstreamManager indicates an expected call of GetUpstreamManager. 153 func (mr *MockCaptureMockRecorder) GetUpstreamManager() *gomock.Call { 154 mr.mock.ctrl.T.Helper() 155 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUpstreamManager", reflect.TypeOf((*MockCapture)(nil).GetUpstreamManager)) 156 } 157 158 // Info mocks base method. 159 func (m *MockCapture) Info() (model.CaptureInfo, error) { 160 m.ctrl.T.Helper() 161 ret := m.ctrl.Call(m, "Info") 162 ret0, _ := ret[0].(model.CaptureInfo) 163 ret1, _ := ret[1].(error) 164 return ret0, ret1 165 } 166 167 // Info indicates an expected call of Info. 168 func (mr *MockCaptureMockRecorder) Info() *gomock.Call { 169 mr.mock.ctrl.T.Helper() 170 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Info", reflect.TypeOf((*MockCapture)(nil).Info)) 171 } 172 173 // IsController mocks base method. 174 func (m *MockCapture) IsController() bool { 175 m.ctrl.T.Helper() 176 ret := m.ctrl.Call(m, "IsController") 177 ret0, _ := ret[0].(bool) 178 return ret0 179 } 180 181 // IsController indicates an expected call of IsController. 182 func (mr *MockCaptureMockRecorder) IsController() *gomock.Call { 183 mr.mock.ctrl.T.Helper() 184 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsController", reflect.TypeOf((*MockCapture)(nil).IsController)) 185 } 186 187 // IsReady mocks base method. 188 func (m *MockCapture) IsReady() bool { 189 m.ctrl.T.Helper() 190 ret := m.ctrl.Call(m, "IsReady") 191 ret0, _ := ret[0].(bool) 192 return ret0 193 } 194 195 // IsReady indicates an expected call of IsReady. 196 func (mr *MockCaptureMockRecorder) IsReady() *gomock.Call { 197 mr.mock.ctrl.T.Helper() 198 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsReady", reflect.TypeOf((*MockCapture)(nil).IsReady)) 199 } 200 201 // Liveness mocks base method. 202 func (m *MockCapture) Liveness() model.Liveness { 203 m.ctrl.T.Helper() 204 ret := m.ctrl.Call(m, "Liveness") 205 ret0, _ := ret[0].(model.Liveness) 206 return ret0 207 } 208 209 // Liveness indicates an expected call of Liveness. 210 func (mr *MockCaptureMockRecorder) Liveness() *gomock.Call { 211 mr.mock.ctrl.T.Helper() 212 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Liveness", reflect.TypeOf((*MockCapture)(nil).Liveness)) 213 } 214 215 // Run mocks base method. 216 func (m *MockCapture) Run(ctx context.Context) error { 217 m.ctrl.T.Helper() 218 ret := m.ctrl.Call(m, "Run", ctx) 219 ret0, _ := ret[0].(error) 220 return ret0 221 } 222 223 // Run indicates an expected call of Run. 224 func (mr *MockCaptureMockRecorder) Run(ctx interface{}) *gomock.Call { 225 mr.mock.ctrl.T.Helper() 226 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockCapture)(nil).Run), ctx) 227 } 228 229 // StatusProvider mocks base method. 230 func (m *MockCapture) StatusProvider() owner.StatusProvider { 231 m.ctrl.T.Helper() 232 ret := m.ctrl.Call(m, "StatusProvider") 233 ret0, _ := ret[0].(owner.StatusProvider) 234 return ret0 235 } 236 237 // StatusProvider indicates an expected call of StatusProvider. 238 func (mr *MockCaptureMockRecorder) StatusProvider() *gomock.Call { 239 mr.mock.ctrl.T.Helper() 240 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatusProvider", reflect.TypeOf((*MockCapture)(nil).StatusProvider)) 241 } 242 243 // WriteDebugInfo mocks base method. 244 func (m *MockCapture) WriteDebugInfo(ctx context.Context, w io.Writer) { 245 m.ctrl.T.Helper() 246 m.ctrl.Call(m, "WriteDebugInfo", ctx, w) 247 } 248 249 // WriteDebugInfo indicates an expected call of WriteDebugInfo. 250 func (mr *MockCaptureMockRecorder) WriteDebugInfo(ctx, w interface{}) *gomock.Call { 251 mr.mock.ctrl.T.Helper() 252 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteDebugInfo", reflect.TypeOf((*MockCapture)(nil).WriteDebugInfo), ctx, w) 253 }