github.com/iotexproject/iotex-core@v1.14.1-rc1/test/mock/mock_dispatcher/mock_dispatcher.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: ./dispatcher/dispatcher.go
     3  
     4  // Package mock_dispatcher is a generated GoMock package.
     5  package mock_dispatcher
     6  
     7  import (
     8  	context "context"
     9  	reflect "reflect"
    10  
    11  	gomock "github.com/golang/mock/gomock"
    12  	dispatcher "github.com/iotexproject/iotex-core/dispatcher"
    13  	iotexrpc "github.com/iotexproject/iotex-proto/golang/iotexrpc"
    14  	iotextypes "github.com/iotexproject/iotex-proto/golang/iotextypes"
    15  	peer "github.com/libp2p/go-libp2p-core/peer"
    16  	proto "google.golang.org/protobuf/proto"
    17  )
    18  
    19  // MockSubscriber is a mock of Subscriber interface.
    20  type MockSubscriber struct {
    21  	ctrl     *gomock.Controller
    22  	recorder *MockSubscriberMockRecorder
    23  }
    24  
    25  // MockSubscriberMockRecorder is the mock recorder for MockSubscriber.
    26  type MockSubscriberMockRecorder struct {
    27  	mock *MockSubscriber
    28  }
    29  
    30  // NewMockSubscriber creates a new mock instance.
    31  func NewMockSubscriber(ctrl *gomock.Controller) *MockSubscriber {
    32  	mock := &MockSubscriber{ctrl: ctrl}
    33  	mock.recorder = &MockSubscriberMockRecorder{mock}
    34  	return mock
    35  }
    36  
    37  // EXPECT returns an object that allows the caller to indicate expected use.
    38  func (m *MockSubscriber) EXPECT() *MockSubscriberMockRecorder {
    39  	return m.recorder
    40  }
    41  
    42  // HandleAction mocks base method.
    43  func (m *MockSubscriber) HandleAction(arg0 context.Context, arg1 *iotextypes.Action) error {
    44  	m.ctrl.T.Helper()
    45  	ret := m.ctrl.Call(m, "HandleAction", arg0, arg1)
    46  	ret0, _ := ret[0].(error)
    47  	return ret0
    48  }
    49  
    50  // HandleAction indicates an expected call of HandleAction.
    51  func (mr *MockSubscriberMockRecorder) HandleAction(arg0, arg1 interface{}) *gomock.Call {
    52  	mr.mock.ctrl.T.Helper()
    53  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleAction", reflect.TypeOf((*MockSubscriber)(nil).HandleAction), arg0, arg1)
    54  }
    55  
    56  // HandleBlock mocks base method.
    57  func (m *MockSubscriber) HandleBlock(arg0 context.Context, arg1 string, arg2 *iotextypes.Block) error {
    58  	m.ctrl.T.Helper()
    59  	ret := m.ctrl.Call(m, "HandleBlock", arg0, arg1, arg2)
    60  	ret0, _ := ret[0].(error)
    61  	return ret0
    62  }
    63  
    64  // HandleBlock indicates an expected call of HandleBlock.
    65  func (mr *MockSubscriberMockRecorder) HandleBlock(arg0, arg1, arg2 interface{}) *gomock.Call {
    66  	mr.mock.ctrl.T.Helper()
    67  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleBlock", reflect.TypeOf((*MockSubscriber)(nil).HandleBlock), arg0, arg1, arg2)
    68  }
    69  
    70  // HandleConsensusMsg mocks base method.
    71  func (m *MockSubscriber) HandleConsensusMsg(arg0 *iotextypes.ConsensusMessage) error {
    72  	m.ctrl.T.Helper()
    73  	ret := m.ctrl.Call(m, "HandleConsensusMsg", arg0)
    74  	ret0, _ := ret[0].(error)
    75  	return ret0
    76  }
    77  
    78  // HandleConsensusMsg indicates an expected call of HandleConsensusMsg.
    79  func (mr *MockSubscriberMockRecorder) HandleConsensusMsg(arg0 interface{}) *gomock.Call {
    80  	mr.mock.ctrl.T.Helper()
    81  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleConsensusMsg", reflect.TypeOf((*MockSubscriber)(nil).HandleConsensusMsg), arg0)
    82  }
    83  
    84  // HandleNodeInfo mocks base method.
    85  func (m *MockSubscriber) HandleNodeInfo(arg0 context.Context, arg1 string, arg2 *iotextypes.NodeInfo) error {
    86  	m.ctrl.T.Helper()
    87  	ret := m.ctrl.Call(m, "HandleNodeInfo", arg0, arg1, arg2)
    88  	ret0, _ := ret[0].(error)
    89  	return ret0
    90  }
    91  
    92  // HandleNodeInfo indicates an expected call of HandleNodeInfo.
    93  func (mr *MockSubscriberMockRecorder) HandleNodeInfo(arg0, arg1, arg2 interface{}) *gomock.Call {
    94  	mr.mock.ctrl.T.Helper()
    95  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleNodeInfo", reflect.TypeOf((*MockSubscriber)(nil).HandleNodeInfo), arg0, arg1, arg2)
    96  }
    97  
    98  // HandleNodeInfoRequest mocks base method.
    99  func (m *MockSubscriber) HandleNodeInfoRequest(arg0 context.Context, arg1 peer.AddrInfo, arg2 *iotextypes.NodeInfoRequest) error {
   100  	m.ctrl.T.Helper()
   101  	ret := m.ctrl.Call(m, "HandleNodeInfoRequest", arg0, arg1, arg2)
   102  	ret0, _ := ret[0].(error)
   103  	return ret0
   104  }
   105  
   106  // HandleNodeInfoRequest indicates an expected call of HandleNodeInfoRequest.
   107  func (mr *MockSubscriberMockRecorder) HandleNodeInfoRequest(arg0, arg1, arg2 interface{}) *gomock.Call {
   108  	mr.mock.ctrl.T.Helper()
   109  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleNodeInfoRequest", reflect.TypeOf((*MockSubscriber)(nil).HandleNodeInfoRequest), arg0, arg1, arg2)
   110  }
   111  
   112  // HandleSyncRequest mocks base method.
   113  func (m *MockSubscriber) HandleSyncRequest(arg0 context.Context, arg1 peer.AddrInfo, arg2 *iotexrpc.BlockSync) error {
   114  	m.ctrl.T.Helper()
   115  	ret := m.ctrl.Call(m, "HandleSyncRequest", arg0, arg1, arg2)
   116  	ret0, _ := ret[0].(error)
   117  	return ret0
   118  }
   119  
   120  // HandleSyncRequest indicates an expected call of HandleSyncRequest.
   121  func (mr *MockSubscriberMockRecorder) HandleSyncRequest(arg0, arg1, arg2 interface{}) *gomock.Call {
   122  	mr.mock.ctrl.T.Helper()
   123  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleSyncRequest", reflect.TypeOf((*MockSubscriber)(nil).HandleSyncRequest), arg0, arg1, arg2)
   124  }
   125  
   126  // ReportFullness mocks base method.
   127  func (m *MockSubscriber) ReportFullness(arg0 context.Context, arg1 iotexrpc.MessageType, arg2 float32) {
   128  	m.ctrl.T.Helper()
   129  	m.ctrl.Call(m, "ReportFullness", arg0, arg1, arg2)
   130  }
   131  
   132  // ReportFullness indicates an expected call of ReportFullness.
   133  func (mr *MockSubscriberMockRecorder) ReportFullness(arg0, arg1, arg2 interface{}) *gomock.Call {
   134  	mr.mock.ctrl.T.Helper()
   135  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReportFullness", reflect.TypeOf((*MockSubscriber)(nil).ReportFullness), arg0, arg1, arg2)
   136  }
   137  
   138  // MockDispatcher is a mock of Dispatcher interface.
   139  type MockDispatcher struct {
   140  	ctrl     *gomock.Controller
   141  	recorder *MockDispatcherMockRecorder
   142  }
   143  
   144  // MockDispatcherMockRecorder is the mock recorder for MockDispatcher.
   145  type MockDispatcherMockRecorder struct {
   146  	mock *MockDispatcher
   147  }
   148  
   149  // NewMockDispatcher creates a new mock instance.
   150  func NewMockDispatcher(ctrl *gomock.Controller) *MockDispatcher {
   151  	mock := &MockDispatcher{ctrl: ctrl}
   152  	mock.recorder = &MockDispatcherMockRecorder{mock}
   153  	return mock
   154  }
   155  
   156  // EXPECT returns an object that allows the caller to indicate expected use.
   157  func (m *MockDispatcher) EXPECT() *MockDispatcherMockRecorder {
   158  	return m.recorder
   159  }
   160  
   161  // AddSubscriber mocks base method.
   162  func (m *MockDispatcher) AddSubscriber(arg0 uint32, arg1 dispatcher.Subscriber) {
   163  	m.ctrl.T.Helper()
   164  	m.ctrl.Call(m, "AddSubscriber", arg0, arg1)
   165  }
   166  
   167  // AddSubscriber indicates an expected call of AddSubscriber.
   168  func (mr *MockDispatcherMockRecorder) AddSubscriber(arg0, arg1 interface{}) *gomock.Call {
   169  	mr.mock.ctrl.T.Helper()
   170  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddSubscriber", reflect.TypeOf((*MockDispatcher)(nil).AddSubscriber), arg0, arg1)
   171  }
   172  
   173  // HandleBroadcast mocks base method.
   174  func (m *MockDispatcher) HandleBroadcast(arg0 context.Context, arg1 uint32, arg2 string, arg3 proto.Message) {
   175  	m.ctrl.T.Helper()
   176  	m.ctrl.Call(m, "HandleBroadcast", arg0, arg1, arg2, arg3)
   177  }
   178  
   179  // HandleBroadcast indicates an expected call of HandleBroadcast.
   180  func (mr *MockDispatcherMockRecorder) HandleBroadcast(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
   181  	mr.mock.ctrl.T.Helper()
   182  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleBroadcast", reflect.TypeOf((*MockDispatcher)(nil).HandleBroadcast), arg0, arg1, arg2, arg3)
   183  }
   184  
   185  // HandleTell mocks base method.
   186  func (m *MockDispatcher) HandleTell(arg0 context.Context, arg1 uint32, arg2 peer.AddrInfo, arg3 proto.Message) {
   187  	m.ctrl.T.Helper()
   188  	m.ctrl.Call(m, "HandleTell", arg0, arg1, arg2, arg3)
   189  }
   190  
   191  // HandleTell indicates an expected call of HandleTell.
   192  func (mr *MockDispatcherMockRecorder) HandleTell(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
   193  	mr.mock.ctrl.T.Helper()
   194  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HandleTell", reflect.TypeOf((*MockDispatcher)(nil).HandleTell), arg0, arg1, arg2, arg3)
   195  }
   196  
   197  // Start mocks base method.
   198  func (m *MockDispatcher) Start(arg0 context.Context) error {
   199  	m.ctrl.T.Helper()
   200  	ret := m.ctrl.Call(m, "Start", arg0)
   201  	ret0, _ := ret[0].(error)
   202  	return ret0
   203  }
   204  
   205  // Start indicates an expected call of Start.
   206  func (mr *MockDispatcherMockRecorder) Start(arg0 interface{}) *gomock.Call {
   207  	mr.mock.ctrl.T.Helper()
   208  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockDispatcher)(nil).Start), arg0)
   209  }
   210  
   211  // Stop mocks base method.
   212  func (m *MockDispatcher) Stop(arg0 context.Context) error {
   213  	m.ctrl.T.Helper()
   214  	ret := m.ctrl.Call(m, "Stop", arg0)
   215  	ret0, _ := ret[0].(error)
   216  	return ret0
   217  }
   218  
   219  // Stop indicates an expected call of Stop.
   220  func (mr *MockDispatcherMockRecorder) Stop(arg0 interface{}) *gomock.Call {
   221  	mr.mock.ctrl.T.Helper()
   222  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockDispatcher)(nil).Stop), arg0)
   223  }