github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/cdc/owner/mock/status_provider_mock.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: cdc/owner/status_provider.go
     3  
     4  // Package mock_owner is a generated GoMock package.
     5  package mock_owner
     6  
     7  import (
     8  	context "context"
     9  	reflect "reflect"
    10  
    11  	gomock "github.com/golang/mock/gomock"
    12  	model "github.com/pingcap/tiflow/cdc/model"
    13  )
    14  
    15  // MockStatusProvider is a mock of StatusProvider interface.
    16  type MockStatusProvider struct {
    17  	ctrl     *gomock.Controller
    18  	recorder *MockStatusProviderMockRecorder
    19  }
    20  
    21  // MockStatusProviderMockRecorder is the mock recorder for MockStatusProvider.
    22  type MockStatusProviderMockRecorder struct {
    23  	mock *MockStatusProvider
    24  }
    25  
    26  // NewMockStatusProvider creates a new mock instance.
    27  func NewMockStatusProvider(ctrl *gomock.Controller) *MockStatusProvider {
    28  	mock := &MockStatusProvider{ctrl: ctrl}
    29  	mock.recorder = &MockStatusProviderMockRecorder{mock}
    30  	return mock
    31  }
    32  
    33  // EXPECT returns an object that allows the caller to indicate expected use.
    34  func (m *MockStatusProvider) EXPECT() *MockStatusProviderMockRecorder {
    35  	return m.recorder
    36  }
    37  
    38  // GetAllTaskStatuses mocks base method.
    39  func (m *MockStatusProvider) GetAllTaskStatuses(ctx context.Context, changefeedID model.ChangeFeedID) (map[model.CaptureID]*model.TaskStatus, error) {
    40  	m.ctrl.T.Helper()
    41  	ret := m.ctrl.Call(m, "GetAllTaskStatuses", ctx, changefeedID)
    42  	ret0, _ := ret[0].(map[model.CaptureID]*model.TaskStatus)
    43  	ret1, _ := ret[1].(error)
    44  	return ret0, ret1
    45  }
    46  
    47  // GetAllTaskStatuses indicates an expected call of GetAllTaskStatuses.
    48  func (mr *MockStatusProviderMockRecorder) GetAllTaskStatuses(ctx, changefeedID interface{}) *gomock.Call {
    49  	mr.mock.ctrl.T.Helper()
    50  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllTaskStatuses", reflect.TypeOf((*MockStatusProvider)(nil).GetAllTaskStatuses), ctx, changefeedID)
    51  }
    52  
    53  // GetCaptures mocks base method.
    54  func (m *MockStatusProvider) GetCaptures(ctx context.Context) ([]*model.CaptureInfo, error) {
    55  	m.ctrl.T.Helper()
    56  	ret := m.ctrl.Call(m, "GetCaptures", ctx)
    57  	ret0, _ := ret[0].([]*model.CaptureInfo)
    58  	ret1, _ := ret[1].(error)
    59  	return ret0, ret1
    60  }
    61  
    62  // GetCaptures indicates an expected call of GetCaptures.
    63  func (mr *MockStatusProviderMockRecorder) GetCaptures(ctx interface{}) *gomock.Call {
    64  	mr.mock.ctrl.T.Helper()
    65  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCaptures", reflect.TypeOf((*MockStatusProvider)(nil).GetCaptures), ctx)
    66  }
    67  
    68  // GetChangeFeedInfo mocks base method.
    69  func (m *MockStatusProvider) GetChangeFeedInfo(ctx context.Context, changefeedID model.ChangeFeedID) (*model.ChangeFeedInfo, error) {
    70  	m.ctrl.T.Helper()
    71  	ret := m.ctrl.Call(m, "GetChangeFeedInfo", ctx, changefeedID)
    72  	ret0, _ := ret[0].(*model.ChangeFeedInfo)
    73  	ret1, _ := ret[1].(error)
    74  	return ret0, ret1
    75  }
    76  
    77  // GetChangeFeedInfo indicates an expected call of GetChangeFeedInfo.
    78  func (mr *MockStatusProviderMockRecorder) GetChangeFeedInfo(ctx, changefeedID interface{}) *gomock.Call {
    79  	mr.mock.ctrl.T.Helper()
    80  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChangeFeedInfo", reflect.TypeOf((*MockStatusProvider)(nil).GetChangeFeedInfo), ctx, changefeedID)
    81  }
    82  
    83  // GetChangeFeedStatus mocks base method.
    84  func (m *MockStatusProvider) GetChangeFeedStatus(ctx context.Context, changefeedID model.ChangeFeedID) (*model.ChangeFeedStatusForAPI, error) {
    85  	m.ctrl.T.Helper()
    86  	ret := m.ctrl.Call(m, "GetChangeFeedStatus", ctx, changefeedID)
    87  	ret0, _ := ret[0].(*model.ChangeFeedStatusForAPI)
    88  	ret1, _ := ret[1].(error)
    89  	return ret0, ret1
    90  }
    91  
    92  // GetChangeFeedStatus indicates an expected call of GetChangeFeedStatus.
    93  func (mr *MockStatusProviderMockRecorder) GetChangeFeedStatus(ctx, changefeedID interface{}) *gomock.Call {
    94  	mr.mock.ctrl.T.Helper()
    95  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChangeFeedStatus", reflect.TypeOf((*MockStatusProvider)(nil).GetChangeFeedStatus), ctx, changefeedID)
    96  }
    97  
    98  // GetChangeFeedSyncedStatus mocks base method.
    99  func (m *MockStatusProvider) GetChangeFeedSyncedStatus(ctx context.Context, changefeedID model.ChangeFeedID) (*model.ChangeFeedSyncedStatusForAPI, error) {
   100  	m.ctrl.T.Helper()
   101  	ret := m.ctrl.Call(m, "GetChangeFeedSyncedStatus", ctx, changefeedID)
   102  	ret0, _ := ret[0].(*model.ChangeFeedSyncedStatusForAPI)
   103  	ret1, _ := ret[1].(error)
   104  	return ret0, ret1
   105  }
   106  
   107  // GetChangeFeedSyncedStatus indicates an expected call of GetChangeFeedSyncedStatus.
   108  func (mr *MockStatusProviderMockRecorder) GetChangeFeedSyncedStatus(ctx, changefeedID interface{}) *gomock.Call {
   109  	mr.mock.ctrl.T.Helper()
   110  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChangeFeedSyncedStatus", reflect.TypeOf((*MockStatusProvider)(nil).GetChangeFeedSyncedStatus), ctx, changefeedID)
   111  }
   112  
   113  // GetProcessors mocks base method.
   114  func (m *MockStatusProvider) GetProcessors(ctx context.Context) ([]*model.ProcInfoSnap, error) {
   115  	m.ctrl.T.Helper()
   116  	ret := m.ctrl.Call(m, "GetProcessors", ctx)
   117  	ret0, _ := ret[0].([]*model.ProcInfoSnap)
   118  	ret1, _ := ret[1].(error)
   119  	return ret0, ret1
   120  }
   121  
   122  // GetProcessors indicates an expected call of GetProcessors.
   123  func (mr *MockStatusProviderMockRecorder) GetProcessors(ctx interface{}) *gomock.Call {
   124  	mr.mock.ctrl.T.Helper()
   125  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetProcessors", reflect.TypeOf((*MockStatusProvider)(nil).GetProcessors), ctx)
   126  }
   127  
   128  // IsChangefeedOwner mocks base method.
   129  func (m *MockStatusProvider) IsChangefeedOwner(ctx context.Context, id model.ChangeFeedID) (bool, error) {
   130  	m.ctrl.T.Helper()
   131  	ret := m.ctrl.Call(m, "IsChangefeedOwner", ctx, id)
   132  	ret0, _ := ret[0].(bool)
   133  	ret1, _ := ret[1].(error)
   134  	return ret0, ret1
   135  }
   136  
   137  // IsChangefeedOwner indicates an expected call of IsChangefeedOwner.
   138  func (mr *MockStatusProviderMockRecorder) IsChangefeedOwner(ctx, id interface{}) *gomock.Call {
   139  	mr.mock.ctrl.T.Helper()
   140  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsChangefeedOwner", reflect.TypeOf((*MockStatusProvider)(nil).IsChangefeedOwner), ctx, id)
   141  }
   142  
   143  // IsHealthy mocks base method.
   144  func (m *MockStatusProvider) IsHealthy(ctx context.Context) (bool, error) {
   145  	m.ctrl.T.Helper()
   146  	ret := m.ctrl.Call(m, "IsHealthy", ctx)
   147  	ret0, _ := ret[0].(bool)
   148  	ret1, _ := ret[1].(error)
   149  	return ret0, ret1
   150  }
   151  
   152  // IsHealthy indicates an expected call of IsHealthy.
   153  func (mr *MockStatusProviderMockRecorder) IsHealthy(ctx interface{}) *gomock.Call {
   154  	mr.mock.ctrl.T.Helper()
   155  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsHealthy", reflect.TypeOf((*MockStatusProvider)(nil).IsHealthy), ctx)
   156  }