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