github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/cdc/owner/mock/owner_mock.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: cdc/owner/owner.go 3 4 // Package mock_owner is a generated GoMock package. 5 package mock_owner 6 7 import ( 8 context "context" 9 io "io" 10 reflect "reflect" 11 12 gomock "github.com/golang/mock/gomock" 13 model "github.com/pingcap/tiflow/cdc/model" 14 owner "github.com/pingcap/tiflow/cdc/owner" 15 scheduler "github.com/pingcap/tiflow/cdc/scheduler" 16 ) 17 18 // MockOwner is a mock of Owner interface. 19 type MockOwner struct { 20 ctrl *gomock.Controller 21 recorder *MockOwnerMockRecorder 22 } 23 24 // MockOwnerMockRecorder is the mock recorder for MockOwner. 25 type MockOwnerMockRecorder struct { 26 mock *MockOwner 27 } 28 29 // NewMockOwner creates a new mock instance. 30 func NewMockOwner(ctrl *gomock.Controller) *MockOwner { 31 mock := &MockOwner{ctrl: ctrl} 32 mock.recorder = &MockOwnerMockRecorder{mock} 33 return mock 34 } 35 36 // EXPECT returns an object that allows the caller to indicate expected use. 37 func (m *MockOwner) EXPECT() *MockOwnerMockRecorder { 38 return m.recorder 39 } 40 41 // AsyncStop mocks base method. 42 func (m *MockOwner) AsyncStop() { 43 m.ctrl.T.Helper() 44 m.ctrl.Call(m, "AsyncStop") 45 } 46 47 // AsyncStop indicates an expected call of AsyncStop. 48 func (mr *MockOwnerMockRecorder) AsyncStop() *gomock.Call { 49 mr.mock.ctrl.T.Helper() 50 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AsyncStop", reflect.TypeOf((*MockOwner)(nil).AsyncStop)) 51 } 52 53 // DrainCapture mocks base method. 54 func (m *MockOwner) DrainCapture(query *scheduler.Query, done chan<- error) { 55 m.ctrl.T.Helper() 56 m.ctrl.Call(m, "DrainCapture", query, done) 57 } 58 59 // DrainCapture indicates an expected call of DrainCapture. 60 func (mr *MockOwnerMockRecorder) DrainCapture(query, done interface{}) *gomock.Call { 61 mr.mock.ctrl.T.Helper() 62 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DrainCapture", reflect.TypeOf((*MockOwner)(nil).DrainCapture), query, done) 63 } 64 65 // EnqueueJob mocks base method. 66 func (m *MockOwner) EnqueueJob(adminJob model.AdminJob, done chan<- error) { 67 m.ctrl.T.Helper() 68 m.ctrl.Call(m, "EnqueueJob", adminJob, done) 69 } 70 71 // EnqueueJob indicates an expected call of EnqueueJob. 72 func (mr *MockOwnerMockRecorder) EnqueueJob(adminJob, done interface{}) *gomock.Call { 73 mr.mock.ctrl.T.Helper() 74 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnqueueJob", reflect.TypeOf((*MockOwner)(nil).EnqueueJob), adminJob, done) 75 } 76 77 // Query mocks base method. 78 func (m *MockOwner) Query(query *owner.Query, done chan<- error) { 79 m.ctrl.T.Helper() 80 m.ctrl.Call(m, "Query", query, done) 81 } 82 83 // Query indicates an expected call of Query. 84 func (mr *MockOwnerMockRecorder) Query(query, done interface{}) *gomock.Call { 85 mr.mock.ctrl.T.Helper() 86 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Query", reflect.TypeOf((*MockOwner)(nil).Query), query, done) 87 } 88 89 // RebalanceTables mocks base method. 90 func (m *MockOwner) RebalanceTables(cfID model.ChangeFeedID, done chan<- error) { 91 m.ctrl.T.Helper() 92 m.ctrl.Call(m, "RebalanceTables", cfID, done) 93 } 94 95 // RebalanceTables indicates an expected call of RebalanceTables. 96 func (mr *MockOwnerMockRecorder) RebalanceTables(cfID, done interface{}) *gomock.Call { 97 mr.mock.ctrl.T.Helper() 98 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RebalanceTables", reflect.TypeOf((*MockOwner)(nil).RebalanceTables), cfID, done) 99 } 100 101 // ScheduleTable mocks base method. 102 func (m *MockOwner) ScheduleTable(cfID model.ChangeFeedID, toCapture model.CaptureID, tableID model.TableID, done chan<- error) { 103 m.ctrl.T.Helper() 104 m.ctrl.Call(m, "ScheduleTable", cfID, toCapture, tableID, done) 105 } 106 107 // ScheduleTable indicates an expected call of ScheduleTable. 108 func (mr *MockOwnerMockRecorder) ScheduleTable(cfID, toCapture, tableID, done interface{}) *gomock.Call { 109 mr.mock.ctrl.T.Helper() 110 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ScheduleTable", reflect.TypeOf((*MockOwner)(nil).ScheduleTable), cfID, toCapture, tableID, done) 111 } 112 113 // UpdateChangefeed mocks base method. 114 func (m *MockOwner) UpdateChangefeed(ctx context.Context, changeFeedInfo *model.ChangeFeedInfo) error { 115 m.ctrl.T.Helper() 116 ret := m.ctrl.Call(m, "UpdateChangefeed", ctx, changeFeedInfo) 117 ret0, _ := ret[0].(error) 118 return ret0 119 } 120 121 // UpdateChangefeed indicates an expected call of UpdateChangefeed. 122 func (mr *MockOwnerMockRecorder) UpdateChangefeed(ctx, changeFeedInfo interface{}) *gomock.Call { 123 mr.mock.ctrl.T.Helper() 124 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateChangefeed", reflect.TypeOf((*MockOwner)(nil).UpdateChangefeed), ctx, changeFeedInfo) 125 } 126 127 // UpdateChangefeedAndUpstream mocks base method. 128 func (m *MockOwner) UpdateChangefeedAndUpstream(ctx context.Context, upstreamInfo *model.UpstreamInfo, changeFeedInfo *model.ChangeFeedInfo) error { 129 m.ctrl.T.Helper() 130 ret := m.ctrl.Call(m, "UpdateChangefeedAndUpstream", ctx, upstreamInfo, changeFeedInfo) 131 ret0, _ := ret[0].(error) 132 return ret0 133 } 134 135 // UpdateChangefeedAndUpstream indicates an expected call of UpdateChangefeedAndUpstream. 136 func (mr *MockOwnerMockRecorder) UpdateChangefeedAndUpstream(ctx, upstreamInfo, changeFeedInfo interface{}) *gomock.Call { 137 mr.mock.ctrl.T.Helper() 138 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateChangefeedAndUpstream", reflect.TypeOf((*MockOwner)(nil).UpdateChangefeedAndUpstream), ctx, upstreamInfo, changeFeedInfo) 139 } 140 141 // WriteDebugInfo mocks base method. 142 func (m *MockOwner) WriteDebugInfo(w io.Writer, done chan<- error) { 143 m.ctrl.T.Helper() 144 m.ctrl.Call(m, "WriteDebugInfo", w, done) 145 } 146 147 // WriteDebugInfo indicates an expected call of WriteDebugInfo. 148 func (mr *MockOwnerMockRecorder) WriteDebugInfo(w, done interface{}) *gomock.Call { 149 mr.mock.ctrl.T.Helper() 150 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteDebugInfo", reflect.TypeOf((*MockOwner)(nil).WriteDebugInfo), w, done) 151 }