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

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