github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/engine/pkg/rpcutil/mock/checker_mock.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: engine/pkg/rpcutil/checker.go
     3  
     4  // Package mock is a generated GoMock package.
     5  package mock
     6  
     7  import (
     8  	reflect "reflect"
     9  
    10  	gomock "github.com/golang/mock/gomock"
    11  )
    12  
    13  // MockForwardChecker is a mock of ForwardChecker interface.
    14  type MockForwardChecker[T any] struct {
    15  	ctrl     *gomock.Controller
    16  	recorder *MockForwardCheckerMockRecorder[T]
    17  }
    18  
    19  // MockForwardCheckerMockRecorder is the mock recorder for MockForwardChecker.
    20  type MockForwardCheckerMockRecorder[T any] struct {
    21  	mock *MockForwardChecker[T]
    22  }
    23  
    24  // NewMockForwardChecker creates a new mock instance.
    25  func NewMockForwardChecker[T any](ctrl *gomock.Controller) *MockForwardChecker[T] {
    26  	mock := &MockForwardChecker[T]{ctrl: ctrl}
    27  	mock.recorder = &MockForwardCheckerMockRecorder[T]{mock}
    28  	return mock
    29  }
    30  
    31  // EXPECT returns an object that allows the caller to indicate expected use.
    32  func (m *MockForwardChecker[T]) EXPECT() *MockForwardCheckerMockRecorder[T] {
    33  	return m.recorder
    34  }
    35  
    36  // IsLeader mocks base method.
    37  func (m *MockForwardChecker[T]) IsLeader() bool {
    38  	m.ctrl.T.Helper()
    39  	ret := m.ctrl.Call(m, "IsLeader")
    40  	ret0, _ := ret[0].(bool)
    41  	return ret0
    42  }
    43  
    44  // IsLeader indicates an expected call of IsLeader.
    45  func (mr *MockForwardCheckerMockRecorder[T]) IsLeader() *gomock.Call {
    46  	mr.mock.ctrl.T.Helper()
    47  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLeader", reflect.TypeOf((*MockForwardChecker[T])(nil).IsLeader))
    48  }
    49  
    50  // LeaderClient mocks base method.
    51  func (m *MockForwardChecker[T]) LeaderClient() (T, error) {
    52  	m.ctrl.T.Helper()
    53  	ret := m.ctrl.Call(m, "LeaderClient")
    54  	ret0, _ := ret[0].(T)
    55  	ret1, _ := ret[1].(error)
    56  	return ret0, ret1
    57  }
    58  
    59  // LeaderClient indicates an expected call of LeaderClient.
    60  func (mr *MockForwardCheckerMockRecorder[T]) LeaderClient() *gomock.Call {
    61  	mr.mock.ctrl.T.Helper()
    62  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeaderClient", reflect.TypeOf((*MockForwardChecker[T])(nil).LeaderClient))
    63  }
    64  
    65  // LeaderOnly mocks base method.
    66  func (m *MockForwardChecker[T]) LeaderOnly(method string) bool {
    67  	m.ctrl.T.Helper()
    68  	ret := m.ctrl.Call(m, "LeaderOnly", method)
    69  	ret0, _ := ret[0].(bool)
    70  	return ret0
    71  }
    72  
    73  // LeaderOnly indicates an expected call of LeaderOnly.
    74  func (mr *MockForwardCheckerMockRecorder[T]) LeaderOnly(method interface{}) *gomock.Call {
    75  	mr.mock.ctrl.T.Helper()
    76  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeaderOnly", reflect.TypeOf((*MockForwardChecker[T])(nil).LeaderOnly), method)
    77  }
    78  
    79  // MockFeatureChecker is a mock of FeatureChecker interface.
    80  type MockFeatureChecker struct {
    81  	ctrl     *gomock.Controller
    82  	recorder *MockFeatureCheckerMockRecorder
    83  }
    84  
    85  // MockFeatureCheckerMockRecorder is the mock recorder for MockFeatureChecker.
    86  type MockFeatureCheckerMockRecorder struct {
    87  	mock *MockFeatureChecker
    88  }
    89  
    90  // NewMockFeatureChecker creates a new mock instance.
    91  func NewMockFeatureChecker(ctrl *gomock.Controller) *MockFeatureChecker {
    92  	mock := &MockFeatureChecker{ctrl: ctrl}
    93  	mock.recorder = &MockFeatureCheckerMockRecorder{mock}
    94  	return mock
    95  }
    96  
    97  // EXPECT returns an object that allows the caller to indicate expected use.
    98  func (m *MockFeatureChecker) EXPECT() *MockFeatureCheckerMockRecorder {
    99  	return m.recorder
   100  }
   101  
   102  // Available mocks base method.
   103  func (m *MockFeatureChecker) Available(method string) bool {
   104  	m.ctrl.T.Helper()
   105  	ret := m.ctrl.Call(m, "Available", method)
   106  	ret0, _ := ret[0].(bool)
   107  	return ret0
   108  }
   109  
   110  // Available indicates an expected call of Available.
   111  func (mr *MockFeatureCheckerMockRecorder) Available(method interface{}) *gomock.Call {
   112  	mr.mock.ctrl.T.Helper()
   113  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Available", reflect.TypeOf((*MockFeatureChecker)(nil).Available), method)
   114  }