github.com/aergoio/aergo@v1.3.1/p2p/p2pmock/mock_peerfinder.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: pool.go
     3  
     4  // Package p2pmock is a generated GoMock package.
     5  package p2pmock
     6  
     7  import (
     8  	p2pcommon "github.com/aergoio/aergo/p2p/p2pcommon"
     9  	types "github.com/aergoio/aergo/types"
    10  	gomock "github.com/golang/mock/gomock"
    11  	network "github.com/libp2p/go-libp2p-core/network"
    12  	reflect "reflect"
    13  )
    14  
    15  // MockPeerEventListener is a mock of PeerEventListener interface
    16  type MockPeerEventListener struct {
    17  	ctrl     *gomock.Controller
    18  	recorder *MockPeerEventListenerMockRecorder
    19  }
    20  
    21  // MockPeerEventListenerMockRecorder is the mock recorder for MockPeerEventListener
    22  type MockPeerEventListenerMockRecorder struct {
    23  	mock *MockPeerEventListener
    24  }
    25  
    26  // NewMockPeerEventListener creates a new mock instance
    27  func NewMockPeerEventListener(ctrl *gomock.Controller) *MockPeerEventListener {
    28  	mock := &MockPeerEventListener{ctrl: ctrl}
    29  	mock.recorder = &MockPeerEventListenerMockRecorder{mock}
    30  	return mock
    31  }
    32  
    33  // EXPECT returns an object that allows the caller to indicate expected use
    34  func (m *MockPeerEventListener) EXPECT() *MockPeerEventListenerMockRecorder {
    35  	return m.recorder
    36  }
    37  
    38  // OnPeerConnect mocks base method
    39  func (m *MockPeerEventListener) OnPeerConnect(pid types.PeerID) {
    40  	m.ctrl.T.Helper()
    41  	m.ctrl.Call(m, "OnPeerConnect", pid)
    42  }
    43  
    44  // OnPeerConnect indicates an expected call of OnPeerConnect
    45  func (mr *MockPeerEventListenerMockRecorder) OnPeerConnect(pid interface{}) *gomock.Call {
    46  	mr.mock.ctrl.T.Helper()
    47  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnPeerConnect", reflect.TypeOf((*MockPeerEventListener)(nil).OnPeerConnect), pid)
    48  }
    49  
    50  // OnPeerDisconnect mocks base method
    51  func (m *MockPeerEventListener) OnPeerDisconnect(peer p2pcommon.RemotePeer) {
    52  	m.ctrl.T.Helper()
    53  	m.ctrl.Call(m, "OnPeerDisconnect", peer)
    54  }
    55  
    56  // OnPeerDisconnect indicates an expected call of OnPeerDisconnect
    57  func (mr *MockPeerEventListenerMockRecorder) OnPeerDisconnect(peer interface{}) *gomock.Call {
    58  	mr.mock.ctrl.T.Helper()
    59  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnPeerDisconnect", reflect.TypeOf((*MockPeerEventListener)(nil).OnPeerDisconnect), peer)
    60  }
    61  
    62  // MockPeerFinder is a mock of PeerFinder interface
    63  type MockPeerFinder struct {
    64  	ctrl     *gomock.Controller
    65  	recorder *MockPeerFinderMockRecorder
    66  }
    67  
    68  // MockPeerFinderMockRecorder is the mock recorder for MockPeerFinder
    69  type MockPeerFinderMockRecorder struct {
    70  	mock *MockPeerFinder
    71  }
    72  
    73  // NewMockPeerFinder creates a new mock instance
    74  func NewMockPeerFinder(ctrl *gomock.Controller) *MockPeerFinder {
    75  	mock := &MockPeerFinder{ctrl: ctrl}
    76  	mock.recorder = &MockPeerFinderMockRecorder{mock}
    77  	return mock
    78  }
    79  
    80  // EXPECT returns an object that allows the caller to indicate expected use
    81  func (m *MockPeerFinder) EXPECT() *MockPeerFinderMockRecorder {
    82  	return m.recorder
    83  }
    84  
    85  // OnPeerConnect mocks base method
    86  func (m *MockPeerFinder) OnPeerConnect(pid types.PeerID) {
    87  	m.ctrl.T.Helper()
    88  	m.ctrl.Call(m, "OnPeerConnect", pid)
    89  }
    90  
    91  // OnPeerConnect indicates an expected call of OnPeerConnect
    92  func (mr *MockPeerFinderMockRecorder) OnPeerConnect(pid interface{}) *gomock.Call {
    93  	mr.mock.ctrl.T.Helper()
    94  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnPeerConnect", reflect.TypeOf((*MockPeerFinder)(nil).OnPeerConnect), pid)
    95  }
    96  
    97  // OnPeerDisconnect mocks base method
    98  func (m *MockPeerFinder) OnPeerDisconnect(peer p2pcommon.RemotePeer) {
    99  	m.ctrl.T.Helper()
   100  	m.ctrl.Call(m, "OnPeerDisconnect", peer)
   101  }
   102  
   103  // OnPeerDisconnect indicates an expected call of OnPeerDisconnect
   104  func (mr *MockPeerFinderMockRecorder) OnPeerDisconnect(peer interface{}) *gomock.Call {
   105  	mr.mock.ctrl.T.Helper()
   106  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnPeerDisconnect", reflect.TypeOf((*MockPeerFinder)(nil).OnPeerDisconnect), peer)
   107  }
   108  
   109  // CheckAndFill mocks base method
   110  func (m *MockPeerFinder) CheckAndFill() {
   111  	m.ctrl.T.Helper()
   112  	m.ctrl.Call(m, "CheckAndFill")
   113  }
   114  
   115  // CheckAndFill indicates an expected call of CheckAndFill
   116  func (mr *MockPeerFinderMockRecorder) CheckAndFill() *gomock.Call {
   117  	mr.mock.ctrl.T.Helper()
   118  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckAndFill", reflect.TypeOf((*MockPeerFinder)(nil).CheckAndFill))
   119  }
   120  
   121  // MockWaitingPeerManager is a mock of WaitingPeerManager interface
   122  type MockWaitingPeerManager struct {
   123  	ctrl     *gomock.Controller
   124  	recorder *MockWaitingPeerManagerMockRecorder
   125  }
   126  
   127  // MockWaitingPeerManagerMockRecorder is the mock recorder for MockWaitingPeerManager
   128  type MockWaitingPeerManagerMockRecorder struct {
   129  	mock *MockWaitingPeerManager
   130  }
   131  
   132  // NewMockWaitingPeerManager creates a new mock instance
   133  func NewMockWaitingPeerManager(ctrl *gomock.Controller) *MockWaitingPeerManager {
   134  	mock := &MockWaitingPeerManager{ctrl: ctrl}
   135  	mock.recorder = &MockWaitingPeerManagerMockRecorder{mock}
   136  	return mock
   137  }
   138  
   139  // EXPECT returns an object that allows the caller to indicate expected use
   140  func (m *MockWaitingPeerManager) EXPECT() *MockWaitingPeerManagerMockRecorder {
   141  	return m.recorder
   142  }
   143  
   144  // OnPeerConnect mocks base method
   145  func (m *MockWaitingPeerManager) OnPeerConnect(pid types.PeerID) {
   146  	m.ctrl.T.Helper()
   147  	m.ctrl.Call(m, "OnPeerConnect", pid)
   148  }
   149  
   150  // OnPeerConnect indicates an expected call of OnPeerConnect
   151  func (mr *MockWaitingPeerManagerMockRecorder) OnPeerConnect(pid interface{}) *gomock.Call {
   152  	mr.mock.ctrl.T.Helper()
   153  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnPeerConnect", reflect.TypeOf((*MockWaitingPeerManager)(nil).OnPeerConnect), pid)
   154  }
   155  
   156  // OnPeerDisconnect mocks base method
   157  func (m *MockWaitingPeerManager) OnPeerDisconnect(peer p2pcommon.RemotePeer) {
   158  	m.ctrl.T.Helper()
   159  	m.ctrl.Call(m, "OnPeerDisconnect", peer)
   160  }
   161  
   162  // OnPeerDisconnect indicates an expected call of OnPeerDisconnect
   163  func (mr *MockWaitingPeerManagerMockRecorder) OnPeerDisconnect(peer interface{}) *gomock.Call {
   164  	mr.mock.ctrl.T.Helper()
   165  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnPeerDisconnect", reflect.TypeOf((*MockWaitingPeerManager)(nil).OnPeerDisconnect), peer)
   166  }
   167  
   168  // OnDiscoveredPeers mocks base method
   169  func (m *MockWaitingPeerManager) OnDiscoveredPeers(metas []p2pcommon.PeerMeta) int {
   170  	m.ctrl.T.Helper()
   171  	ret := m.ctrl.Call(m, "OnDiscoveredPeers", metas)
   172  	ret0, _ := ret[0].(int)
   173  	return ret0
   174  }
   175  
   176  // OnDiscoveredPeers indicates an expected call of OnDiscoveredPeers
   177  func (mr *MockWaitingPeerManagerMockRecorder) OnDiscoveredPeers(metas interface{}) *gomock.Call {
   178  	mr.mock.ctrl.T.Helper()
   179  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnDiscoveredPeers", reflect.TypeOf((*MockWaitingPeerManager)(nil).OnDiscoveredPeers), metas)
   180  }
   181  
   182  // OnWorkDone mocks base method
   183  func (m *MockWaitingPeerManager) OnWorkDone(result p2pcommon.ConnWorkResult) {
   184  	m.ctrl.T.Helper()
   185  	m.ctrl.Call(m, "OnWorkDone", result)
   186  }
   187  
   188  // OnWorkDone indicates an expected call of OnWorkDone
   189  func (mr *MockWaitingPeerManagerMockRecorder) OnWorkDone(result interface{}) *gomock.Call {
   190  	mr.mock.ctrl.T.Helper()
   191  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnWorkDone", reflect.TypeOf((*MockWaitingPeerManager)(nil).OnWorkDone), result)
   192  }
   193  
   194  // CheckAndConnect mocks base method
   195  func (m *MockWaitingPeerManager) CheckAndConnect() {
   196  	m.ctrl.T.Helper()
   197  	m.ctrl.Call(m, "CheckAndConnect")
   198  }
   199  
   200  // CheckAndConnect indicates an expected call of CheckAndConnect
   201  func (mr *MockWaitingPeerManagerMockRecorder) CheckAndConnect() *gomock.Call {
   202  	mr.mock.ctrl.T.Helper()
   203  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckAndConnect", reflect.TypeOf((*MockWaitingPeerManager)(nil).CheckAndConnect))
   204  }
   205  
   206  // InstantConnect mocks base method
   207  func (m *MockWaitingPeerManager) InstantConnect(meta p2pcommon.PeerMeta) {
   208  	m.ctrl.T.Helper()
   209  	m.ctrl.Call(m, "InstantConnect", meta)
   210  }
   211  
   212  // InstantConnect indicates an expected call of InstantConnect
   213  func (mr *MockWaitingPeerManagerMockRecorder) InstantConnect(meta interface{}) *gomock.Call {
   214  	mr.mock.ctrl.T.Helper()
   215  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InstantConnect", reflect.TypeOf((*MockWaitingPeerManager)(nil).InstantConnect), meta)
   216  }
   217  
   218  // OnInboundConn mocks base method
   219  func (m *MockWaitingPeerManager) OnInboundConn(s network.Stream) {
   220  	m.ctrl.T.Helper()
   221  	m.ctrl.Call(m, "OnInboundConn", s)
   222  }
   223  
   224  // OnInboundConn indicates an expected call of OnInboundConn
   225  func (mr *MockWaitingPeerManagerMockRecorder) OnInboundConn(s interface{}) *gomock.Call {
   226  	mr.mock.ctrl.T.Helper()
   227  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnInboundConn", reflect.TypeOf((*MockWaitingPeerManager)(nil).OnInboundConn), s)
   228  }
   229  
   230  // OnInboundConnLegacy mocks base method
   231  func (m *MockWaitingPeerManager) OnInboundConnLegacy(s network.Stream) {
   232  	m.ctrl.T.Helper()
   233  	m.ctrl.Call(m, "OnInboundConnLegacy", s)
   234  }
   235  
   236  // OnInboundConnLegacy indicates an expected call of OnInboundConnLegacy
   237  func (mr *MockWaitingPeerManagerMockRecorder) OnInboundConnLegacy(s interface{}) *gomock.Call {
   238  	mr.mock.ctrl.T.Helper()
   239  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnInboundConnLegacy", reflect.TypeOf((*MockWaitingPeerManager)(nil).OnInboundConnLegacy), s)
   240  }