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