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