github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/p2p/mock/peer_manager.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mockp2p 4 5 import ( 6 context "context" 7 8 irrecoverable "github.com/onflow/flow-go/module/irrecoverable" 9 mock "github.com/stretchr/testify/mock" 10 11 p2p "github.com/onflow/flow-go/network/p2p" 12 13 peer "github.com/libp2p/go-libp2p/core/peer" 14 ) 15 16 // PeerManager is an autogenerated mock type for the PeerManager type 17 type PeerManager struct { 18 mock.Mock 19 } 20 21 // Done provides a mock function with given fields: 22 func (_m *PeerManager) Done() <-chan struct{} { 23 ret := _m.Called() 24 25 var r0 <-chan struct{} 26 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 27 r0 = rf() 28 } else { 29 if ret.Get(0) != nil { 30 r0 = ret.Get(0).(<-chan struct{}) 31 } 32 } 33 34 return r0 35 } 36 37 // ForceUpdatePeers provides a mock function with given fields: _a0 38 func (_m *PeerManager) ForceUpdatePeers(_a0 context.Context) { 39 _m.Called(_a0) 40 } 41 42 // OnRateLimitedPeer provides a mock function with given fields: pid, role, msgType, topic, reason 43 func (_m *PeerManager) OnRateLimitedPeer(pid peer.ID, role string, msgType string, topic string, reason string) { 44 _m.Called(pid, role, msgType, topic, reason) 45 } 46 47 // Ready provides a mock function with given fields: 48 func (_m *PeerManager) Ready() <-chan struct{} { 49 ret := _m.Called() 50 51 var r0 <-chan struct{} 52 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 53 r0 = rf() 54 } else { 55 if ret.Get(0) != nil { 56 r0 = ret.Get(0).(<-chan struct{}) 57 } 58 } 59 60 return r0 61 } 62 63 // RequestPeerUpdate provides a mock function with given fields: 64 func (_m *PeerManager) RequestPeerUpdate() { 65 _m.Called() 66 } 67 68 // SetPeersProvider provides a mock function with given fields: _a0 69 func (_m *PeerManager) SetPeersProvider(_a0 p2p.PeersProvider) { 70 _m.Called(_a0) 71 } 72 73 // Start provides a mock function with given fields: _a0 74 func (_m *PeerManager) Start(_a0 irrecoverable.SignalerContext) { 75 _m.Called(_a0) 76 } 77 78 type mockConstructorTestingTNewPeerManager interface { 79 mock.TestingT 80 Cleanup(func()) 81 } 82 83 // NewPeerManager creates a new instance of PeerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 84 func NewPeerManager(t mockConstructorTestingTNewPeerManager) *PeerManager { 85 mock := &PeerManager{} 86 mock.Mock.Test(t) 87 88 t.Cleanup(func() { mock.AssertExpectations(t) }) 89 90 return mock 91 }